Links

navigation FAQs

How does the Navigation component use the view stack?

The Navigation component uses the navigate.clear('destination_view_path') function to navigate to a view. In the case where view arguments are passed to the view, it uses navigate.clear('destination_view_path', arg1, arg2...).
Please refer to View Navigation for more info.

Why is the navigation drawer not visible on a view?

The Navigation drawer will only be visible on a view when that view is listed as one of the navigation items in the drawer (and visible with show-if / hide-if) AND that view is the only one on the stack, e.g. the back button is not showing.
It is recommended to use navigate.clear('view_path') or navigate.replace('view_path') to navigate to views on which the hamburger menu should display.

Can I omit a view path on a navigation item?

Yes. A typical use-case for this is when you want to group navigation items under one 'heading' inside a section.
To do this, specify child items inside a collapsable parent item, for example:
<section label="Sites">
<item label="Site: Luna" collapsable="true">
<item label="Dashboard" view='luna_dashboard'/>
<item label="Operators" view='luna_operators'/>
<item label="Tasks" view='luna_tasks'/>
</item>
</section>
Result

Is the branding not supposed to fill the available space?

Yes. The background color can be specified using style-header-background="my_named_color" refer to **** the syntax for more info.
Note: When using a PNG, the image should:
  • be at least 224px in width and 136px in height
  • not contain any padding
  • have a transparent background

Can I show and hide the drawer programmatically?

Yes. Please refer to the navigation component methods for more detail.

Are collapsable sections and parent items always in an expanded mode?

When the app is initialized, all collapsable items and sections are expanded, but you can programmatically collapse (and open) items, assigning unique id's and using the setOpen or setCollapsed methods.

Can I hade the "Language" item from the general section?

For apps where switching the app language isn't relevant, the "Language" item can be hidden from the general section by clearing out the languages array in your app's config.json file:
config.json
{
...
"languages": [],
...
}
Last modified 3mo ago