@BRT.SiteMenu()
Generates an unordered list of links to current page's parent Page, siblings and children Pages
The @BRT.SiteMenu() Helper creates link lists based on the position of a page in the sitemap tree branch. With no parameters, this Helper creates the following HTML:
<div> <a href="#">Parent Page</a> </div> <ul> <li><a href="#">Sibling Page One</a></li> <li><a href="#">The Current Page</a> <ul> <li><a href="#">Child Page One</a></li> <li><a href="#">Child Page Two</a></li> </ul> </li> <li><a href="#">Sibling Page Two</a></li> </ul>
Use the 'cssClass:' parameter to add a class to the first <ul> tag.
@BRT.SiteMenu(cssclass:"my-class") creates the following HTML:
<div> <a href="#">Parent Page</a> </div> <ul> <li><a href="#">Sibling Page One</a></li> <li><a href="#">The Current Page</a> <ul> <li><a href="#">Child Page One</a></li> <li><a href="#">Child Page Two</a></li> </ul> </li> <li><a href="#">Sibling Page Two</a></li> </ul>
Use the 'isDropDown:' parameter with the numeric Id of a parent Page to render a drop down menu containing links all of it's child Pages.
If the Page with an Id of '1234' has a friendly name of 'parentpage', the following code:
@BRT.Sitemenu(cssClass:"my-class", isDropDown:1234)
generates the following HTML:
<ul> <li><a href="/friendlyURL1">Page Title 1</a></li> <li><a href="/ friendlyURL21 "> Page Title 2 </a></li> <li><a href="/ friendlyURL3 "> Page Title 3 </a></li> <li><a href="/ friendlyURL4 "> Page Title 4 </a></li> </ul>
Optional Parameters
cssclass: Sets the a css class to be used by the tag(s) created by the Helper
Example: cssClass:"my-class"
cssclass: Sets the a css class to be used by the tag(s) created by the Helper
Example: cssClass:"my-class"
Designates a CSS class to be added to HTML tags generated by the Helper.
isDropDown: The Numeric Id of the starting page in a list of pages
Example: isDropDown:1234
Example: isDropDown:1234
This Parameter indicates the numeric Id of a Page targeted by the Helper. This numeric Id is visible at the end of the URL string when a Page is opened in the Web Console.