Create menu links to dynamic pages after login form

Hello,

I’m trying to create a dashboard, to manage some Powershell scripts. I successfully created a login form and can login and open a dynamic page, lets say my dashboard.

Source: https://github.com/ironmansoftware/universal-dashboard/blob/master/examples/login-pages/forms.ps1

Now I’m trying to create a page and I want to use the $username variable to set some variables and authorization. But as far as I can see I only can use the $username variable on dynamic pages, is it possible to create a link to dynamic pages in the menu?

A simple but example code for now:

$LoginPage = New-UDLoginPage -AuthenticationMethod $FormLogin

$DashboardPage_Static = New-UDPage -Name 'Static' -Icon cloud -content { 
    New-UDCard -Title "Welcome, $User" -Text "This is your custom dashboard."
}

$DashboardPage_Dynamic = New-UDPage -Url "/Dynamnic" -Endpoint {
    New-UDCard -Title "Welcome, $User" -Text "This is your custom dashboard."
}


$Dashboard = New-UDDashboard -LoginPage $LoginPage -Page @(
    $DashboardPage_Dynamic,
    $DashboardPage_Static
)

Start-UDDashboard -Dashboard $Dashboard -Port 1000 -AllowHttpForLogin

Not at the moment, Adam has hinted that we might get better ways to control the content of the hamburger menu, in v2.3

https://forums.ironmansoftware.com/t/return-to-dynamic-page/152/6

I have added buttons to the top of my pages to work around this for now.

New-UDCard -Title "Consultants with IT Accounts" -FontColor "#FFFFFF" -Content {
            New-UDButton -Text "Go to Manager Dashboard" -OnClick {Invoke-UDRedirect -Url "/Manager/"}
        } -BackgroundColor "#252525"

image