Command
New-NavLink
Creates a new navigation link with customizable options for nested links.
Syntax
Description
The New-NavLink function creates a new navigation link with various customizable options such as nested links, name, name color, href, internal page ID, and icon color.
Examples
EXAMPLE 1
New-NavLink -NestedLinks { New-NavLink -Name "Sublink 1" -Href "/sublink1" } -Name "Main Link" -NameColor "blue" -Href "/mainlink" -InternalPageID "main" -IconColor "green"
Creates a new navigation link named "Main Link" with a nested link named "Sublink 1" in blue name color, green icon color, navigating to "/mainlink" with internal page ID "main".EXAMPLE 2
New-NavLink -NestedLinks { New-NavLink -Name "Sublink 2" -Href "/sublink2" } -Name "Another Link" -NameColor "red" -Href "/anotherlink" -InternalPageID "another" -IconColor "yellow"
Creates a new navigation link named "Another Link" with a nested link named "Sublink 2" in red name color, yellow icon color, navigating to "/anotherlink" with internal page ID "another".Parameters
- -Href String
- Specifies the URL to navigate to when the navigation link is clicked.
- -IconColor String
- Specifies the color of the icon for the navigation link.
- -IconSolid String
- ICON SOLID
- -InternalPageID String
- Specifies the internal page ID associated with the navigation link.
- -Name String
- Specifies the name of the navigation link. This parameter is mandatory.
- -NameColor String
- Specifies the color of the navigation link name.
- -NestedLinks ScriptBlock
- Specifies the script block defining the nested link properties.
- -Bordered SwitchParameter
- -BorderedCircle SwitchParameter
- -FlipHorizontal SwitchParameter
- -FlipVertical SwitchParameter
- -IconMaterial String
- FontsMaterialIcon
- -PullLeft SwitchParameter
- -PullRight SwitchParameter
- -Rotate String
- Possible values:
90,180,270 - -Spinning SwitchParameter
- -SpinningReverse SwitchParameter
- -IconRegular String
- ICON REGULAR
- -IconBrands String
- ICON BRANDS
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.