Marking protected pages in your navigation
Previous article Next articleWhen using Calguy1000's FrontEndUsers module in CMS Made Simple you can easily protect the content of your pages and hide the buttons in the navigation for visitors who are not logged in.
But when you are logged in, you can't see the difference in the menu between regular and protected page buttons. With a small addition to the menu template you can add that feature.
Because there are several menu templates, I will give a general explanation on adding it. You will need to see for yourself how it works in your template.
How to use
For changing a navigation template, you have to go to the Design Manager and look for your (default) Navigator template.
Search in the template for the parameter {$node->menutext}. Depending on your template you can find it in multiple lines!
Some examples how to change it:
A. Add a marker
B. Change the button styling with a class
{$node->menutext}
{if $node->type == 'feu_protected_page'}</span>{/if}
Stylesheet example
/* style declarations */
}
More information on Navigator template parameters.
Comment Form
ReviewManager
ReviewManager
1 Comment
Besides a visual clue, it can be handy to filter out menuitems when loggedin or off. For instance when loggedin you hide the signup menu and when logged off you hide the signout option. The CustomContent module has some nice MenuManager PostFilters for this purpose.