Skip to content

Commit

Permalink
Tabbed pages: Document navigation through routes (#2326)
Browse files Browse the repository at this point in the history
Depends on openhab/openhab-webui#2647.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
  • Loading branch information
florian-h05 authored Jul 16, 2024
1 parent dd466b6 commit 7f6b258
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/tabbed-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@ The tabs will be displayed in the order they're defined.
## Building a Tabbed Page

In the Design view, under Tabs, click **Add tab** to add another tab. Then click on the newly added entry to configure the tab. using the black context menu, you can reorder or remove existing tabs.

## Navigating Tabs

As you can see in the screenshot above, navigating through the tabs of tabbed pages is done through a toolbar on the bottom.

However, it is also possible to programatically navigate between the tabs, e.g. when using the [UI Command Item]({{base}}/mainui/about.html#ui-command-item) or the [actions of cloud notifications](/addons/integrations/openhabcloud/#title-tag-reference-id-media-attachments-actions)
This is done by providing the index of the tab in the route, e.g. assuming the UID of the tabbed page in the above example is `MyTabbedPage`, you can navigate to the "Isometric View" tab using the route `/page/MyTabbedPage/0`, to the "Kitchen Picture" tab using `/page/MyTabbedPage/1` and to the "Plan" tab using `/pages/MyTabbedPage/2`.

0 comments on commit 7f6b258

Please sign in to comment.