Developer forum

Forum » Templates » Two versions of the main menu

Two versions of the main menu


Reply

I want to make a main menu structure in Dynamicweb, showing the main pages of the website. But if you are not logged in, the first link is different.


 


So if you are logged in you will see:


 


Frontpage, Shop, Help


 


And if you are not logged in you will see:


 


Information, Shop, Help


 


In other words, most of the menu is the same, only one link changes.


 


How can I set this up in Dynamic web?


 


I would hate to have to make identical pages for Shop and Help in order to make this menustructure. Do I have to hardcode the menustructure in a template to accomplish this?


 


 


Replies

 
Reply

Hi Sune


 


1. Right click the page called 'Frontpage' and select 'Edit Page'.


2. Go to the tab calld 'Extranet'.


3. Select the groups that should have access to the page.


4. Set 'Show in menu' to 'Only for users with access'.


 


This will do that users in the seleted groups will see this page when are logged in.


To other users the page will be hidden.


 


// Sebastian

 
Nicolai Høeg Pedersen
Reply
src@forbrugerliv.dk wrote:


I want to make a main menu structure in Dynamicweb, showing the main pages of the website. But if you are not logged in, the first link is different.




 




So if you are logged in you will see:




 




Frontpage, Shop, Help




 




And if you are not logged in you will see:




 




Information, Shop, Help




 




In other words, most of the menu is the same, only one link changes.




 




How can I set this up in Dynamic web?




 




I would hate to have to make identical pages for Shop and Help in order to make this menustructure. Do I have to hardcode the menustructure in a template to accomplish this?




 




 





Its easy to have a navigation item show up after login - simply add a group on it in Edit Page on the Extranet tab, and set the "Show in menu" option to "Only for users with access". Then the navigation item will not be shown untill the user logs in.


 


It takes some modification to remove an item because a user is logged in, but it can be done using CSS/JS. In the pagetemplate make a little JS that hides the Frontpage navigation item if the template tag DW_extranet_AccessUserID contains a value.

 

You must be logged in to post in the forum