Hi All,
Is there a variable I can reference to get the current page name?
e.g.
New-UDPage -Name “My Page” -Content {
New-UDTypography -Text “$currentPage page”
}
Thanks
Hi All,
Is there a variable I can reference to get the current page name?
e.g.
New-UDPage -Name “My Page” -Content {
New-UDTypography -Text “$currentPage page”
}
Thanks
I know this is an old topic, but I would also like to know this and wouldn’t open my own topic since this already exist.
Maybe it should be a feature request if it doesn’t exist?
Just looked through the documentation and issue tracker, and couldn’t find anything like this.
I haven’t found a way to do this so I opened an issue: Get Page Name in Dashboard · Issue #2108 · ironmansoftware/issues · GitHub
probably not what you are really wanting but I have a vscode snippet to which inserts the name under the page definition or module
$pagescript = “PSUPage.ps1”
I just created a snippet and then added a keybinding, now when I want to insert the name I just hit the key binding and the name is inserted, or just type the snippet prefix and enter.
snippet def:
“insert Scriptname”: {
“prefix”: “psu”,
“body”: [
"$$pagescript=‘${TM_FILENAME_BASE}’ "
],
“description”: “insert scriptname”
}