Multiple PageMenu controls

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
7/17/2009 5:19:16 PM
Gravatar
Total Posts 2239

Multiple PageMenu controls

I would like to have a menu system similar to what is on the mojoPortal site; Horizontal SiteMenu, Horizontal PageMenu, and a Vertical PageMenu for pages 3rd generation pages.

I added:

<portal:PageMenu id="PageMenu2" runat="server" TopLevelOnly="true"
    UseTreeView="true" HideMenuOnSiteMap="false" UseSpanInLinks="true"
    Direction="Vertical" StartingNodeOffset="2"/>

to my layout.master and the vertical menu shows up on the correct page but the first PageMenu also resets to the content of the Vertical PageMenu.

You can see this in action at http://acckc.org/mojo. Click on the Ministry SiteMenu item and then the Christian Education PageMenu item. After doing so, you will notice that the Horizontal PageMenu resets with one item, CENew Page, I don't want this to happen. I want the Horizontal PageMenu to stay as it was before clicking on Christian Education.

7/18/2009 10:39:11 AM
Gravatar
Total Posts 18439

Re: Multiple PageMenu controls

Hi Joe,

You can see how to do it by looking at the andreasvicklund-02 skin which has 2 levels of horizontal menus then a vertical menu for pages deeper than 2 levels. I copied the approach from that skin in making the one on this site. Note that andreasvicklund-02-alt1 takes it a step further with 3 levels of horizontal menus and then a vertical menu for pages deeper than 3 levels.

Hope it helps,

Joe

7/20/2009 3:46:10 PM
Gravatar
Total Posts 2239

Re: Multiple PageMenu controls

Thanks, I was missing:

<asp:SiteMapDataSource ID="level3datasource" runat="server" ShowStartingNode="false" />

towards the top of the layout.master,

DynamicDisplayLevels="0"

in the first PageMenu control, and I was also missing

SiteMapDataSource="level3datasource"

 

Now I am running into a different problem. The PageMenu control is shown on the Register and Login pages. I checked this out using the andreasviklund-02 skin on the demo site and it does the same thing.

I added the LoginPageRelativeUrl setting in the user.config to point to a new Login page which shows the entire menu so it doesn't look silly with the PageMenu and not the SiteMenu. I haven't found a reference to a similar setting for the Register page so I modifed the Register page to hide the menu entirely. I don't like this solution as it is not viable after upgrades. I also prefer to not have a menu on these pages.

Is it feasible to hide all PageMenu controls on the Login and Register pages or maybe even allow administrators (through a web.config app setting) to decide if they want the SiteMenu and PageMenu controls to be displayed on the Login and Register pages?

Thanks again Joe!

-Joe D.

7/22/2009 6:49:53 AM
Gravatar
Total Posts 18439

Re: Multiple PageMenu controls

Hi Joe,

Good point, the original intention was to hide all menus on those pages, it was an oversight when we added skins with more levels of menus that I forgot to hide those new ones. The easiest solution is to fix it so it hides them all so thats what I will do for now. Maybe at some point I will add some config options but generally I think its best practice to not show menus on those pages and people who disagree can use a custom login or register page.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.