Announcing MenuManager 1.3 (and How To achieve custom menus for logged in users)
Posted: Wed Mar 28, 2007 3:24 pm
MenuManager 1.3 has been released, and is in the forge. It adds two new parameters 'includeprefix' and 'excludeprefix' which can be used in conjunction with the FrontEndUsers and CustomContent modules to customize the menu to only authorized people.
Here's a guide on how to use these new parameters:
Scenario 1: You have more private pages than public pages
Go into page content, and for each of your public pages add 'pub-' to the beginning of the page alias
In your template, use something resembling this code (ymmv):
This should result in (when not loggedin), only the pages who's page alias has the 'pub-' prefix being displayed. Note, you will need to ensure that you tag each of your public pages, not just the parents.
Scenario 2: You have more public pages than private pages
Go into page content, and for each of your private pages add 'priv-' to the beginning of the page alias
in your template, use something resembling this code (ymmv):
This should result in (when not loggedin), the private pages being hidden (because we are excluding any page (and it's children) who's page alias prefix matches 'priv-'.
I hope you all understood this, and can now have a fully flexible menu.
Here's a guide on how to use these new parameters:
Scenario 1: You have more private pages than public pages
Go into page content, and for each of your public pages add 'pub-' to the beginning of the page alias
In your template, use something resembling this code (ymmv):
Code: Select all
{if isset($customcontent_loggedin) && $customcontent_loggedin > 0}
{menu}
{else}
{menu includeprefix='pub-'}
{/if}
Scenario 2: You have more public pages than private pages
Go into page content, and for each of your private pages add 'priv-' to the beginning of the page alias
in your template, use something resembling this code (ymmv):
Code: Select all
{if isset($customcontent_loggedin) && $customcontent_loggedin > 0}
{menu}
{else}
{menu excludeprefix='priv-'}
{/if}
I hope you all understood this, and can now have a fully flexible menu.