Menus and pages

Hi all,

Regarding the “New-UDPage…} -NavigationLayout permanent -LoadNavigation $Navigation”, is it possible to style/customise the app bar that is created?

As a test, within the $Navigation scriptblock I’ve added a New-UDAppBar with -Drawer $null which I can style (adding logo elements, UDChips, Typography etc) and set in a fixed position but this renders beneath the default appbar that is created with “-NavigationLayout permanent -LoadNavigation $Navigation”

Has anyone solved this, or know of a way to customise the default app bar?

EDIT: I worked out this way of achieving what I was after, it may be very hacky, completely wrong way to go about it, but it’s working for now :stuck_out_tongue:

In the $Navigation script block that is loaded for each page I set an Id of ‘CustomisedAppBar’

$Navigation = {
    New-UDAppBar -Id 'CustomisedAppBar' -DisableThemeToggle -Children {
...
...

On my New-UDDashboard I’ve added -Stylesheets @("/assets/style_changes.css"

New-UDDashboard -Title "Dashboard Nav Test" -Theme $Theme -Pages $Pages -Stylesheets @("/assets/style_changes.css")

In this css file I’ve hidden the header.MuiAppBar-root element.class and made visible only my New-UDAppBar with the Id of ‘CustomisedAppBar’

header.MuiAppBar-root {
	visibility: hidden !important;
}
#CustomisedAppBar {
    visibility: visible !important;
}

So yeah, probably a bit huckety - but it’s working.

Cheers,
Steve.