SiteMenu Helper

Last Updated 3/5/2015
Drop @BRT.SiteMenu() into your page and it generates page-aware navigation in an unordered list. It shows the current page's parent, the sibling pages and the current page's children.

Optional parameters

  • cssclass - (string) a css class added to the first <ul>
  • isDropDown - (integer) the starting page Id of a list of pages.

Default Code

@BRT.SiteMenu()
The HTML looks like this...
<div class="brt-section-top">
     <a href="#">Parent Page</a>
</div>
<ul>
     <li><a href="#">A sibling page</a></li>
     <li><a href="#" class="brt-active">The current page</a>
          <ul>
               <li><a href="#">The first child page of the current page</a></li>
          </ul>
     </li>
     <li><a href="#">The third page under the parent</a></li>
</ul>

cssclass

You can also optionally pass a class parameter like this and it will be put into the first  <ul class="whatever you pass it">
@BRT.SiteMenu(cssclass:"pass into the class of the ul")

isDropDown

Easily create a drop down menu in any page/layout for any sitemap tree branch

Example

This example shows the General branch of this website.
@BRT.SiteMenu(cssclass:"myclass", isDropDown:5011) 
The HTML looks like this...
<ul class="myclass">
     <li><a href="/consoleconfiguration">Console Configuration</a></li>
     <li><a href="/definitionsofpermissions">Definitions of Permissions</a></li>
     <li><a href="/permissionsinvitingusers">Permissions/Inviting Users</a></li>
     <li><a href="/updatinguserprofiles">Updating User Profiles</a></li>
</ul>    

Article Topics

For Developers

Want to learn more?

Call 800-924-5220 or

Schedule a demo