We recently announced the release of some new attributes and features on our menu tokens, which are used to create templates on our Water, Sky, and Light content management systems. These new features allow designers to accomplish things with our menu tokens that weren't previously possible. This article will explain one exciting new capability -- expanding-style section menus.
Tip: for full documentation on our token system, see the token reference guide on our account support website.
The Challenge
The sectionmenu token used to be the only way to generate a section-specific menu on our system. But the sectionmenu is not an "expanding" menu. Rather than expanding to show nested menu levels deeper and deeper into the site, the section menu always stays focused on the user's current level. Therefore, as a user navigates deeper into the site, the higher levels are lost and replaced with new, lower menu levels.
The globalmenu token could meet the needs of those who were after an expanding-style menu. However, it always displayed the full hierarchy of the site all the way up to the root level. Often, designers expressed a desire to have an expanding section menu -- one that would only display pages within a specific section of the site -- but that would retain the full hierarchy of that section, in an expanding style.
The Solution: showLevels
Expanding-style-section-menu-lovers fear no more! With the introduction of the showLevels attribute on the globalmenu token, you can now utilize the expanding-style global menu on a specific section of your site.
For a visual illustration, please take a look at the images below. These images show a sectionmenu token and a globalmenu token displayed on the same page of the same site, one right above the other. The menu items are named according to their levels for easy reference.
Image #1
Menus when user is on a Level 1 page
Image #2
Menus when user is on a Level 2 page
The tokens used to generate the above menus are as follows:
Section Menu: <$sectionmenu cssClass='nav'/$>
Global Menu: <$globalmenu showLevels="2,3" showHome="false" cssClass="nav"/$>
Image #1 shows that when you are on a level 1 page, both menus output exactly the same results. However, image #2 shows the difference. When the user navigates to a level 2 page that has child pages, the section menu "skips" down and displays level 3, causing level 2 to disappear. The globalmenu, on the other hand, generates level 3 in a nested list while continuing to display level 2. It is this expanding-style that is now possible at the section level through the use of showLevels on the globalmenu token.
This is just one example of how the new showLevels attribute can be used on your site. There are many other possible implementations, and we may cover additional ideas in future posts. We hope you enjoy the new attributes. Please let us know if you have any comments on or questions about the new functionality.
Posted on
Mon, March 17, 2008
by Tim Wall