Portal Engine
Version 2.x > Portal Engine > Splitting main menu into two parts View modes: 
User avatar
Member
Member
persun - 12/15/2006 5:11:42 PM
   
Splitting main menu into two parts
Hello,

Is it possible to split the main menu into two parts located at different positions on the page (tab menu and tab sub-menu, sort of) without nesting the submenu pages underneath top-level pages? For instance I may want the menu items "Home", "Company", "Solutions" etc to be inte the top menu and "Login", "Search", "Site Map" in the sub-menu (these are all top-level items, so to speak, but split across two menus). Would this require me to define a new document type (submenu item, for example) so that I can separate them or is there better way?

Thanks,

Per

User avatar
Member
Member
matt - 12/15/2006 5:58:18 PM
   
Re: Splitting main menu into two parts
I accomplished this by creating a "Submenu" document to nest the options below in the heirarchy. Then set the path of my menu to the root of my Submenu document. Then I just remove the Submenu document from the menu from within it's properties to keep it from showing up in the "Main Menu" (in this case the root of the site).

Like so (hopefull this formats correctly)

Home
Company
Solutions
Submenu
^-Login
^-Search
^-Site Map

So the submenu document is hidden from menu items. Then I just add a navigation web part to the other pages where /Submenu/% is the root path.

Make sense?

User avatar
Member
Member
persun - 12/15/2006 6:18:59 PM
   
Re: Splitting main menu into two parts
Yep, makes sense. I actually tried this too. Though, for some reason I couldn't get the pages underneath "submenu" to show properly, so I gave up and went to get some support on the forums instead. Late in the afternoon you know :)

Thanks for the tip. I will try this again first thing on Monday.

User avatar
Guest
admin - 12/18/2006 10:20:47 AM
   
Re: Splitting main menu into two parts
Well, there's another option how to create two "main menus": you can add a custom field to document type Page (menu item) in Site Manager -> Development -> Document types and call it "menu group". Then, you can place two menu web parts on the home page or master page and set their WHERE condition value to something like "menugroup='left'" or "menugroup='right'".

Regards,

User avatar
Member
Member
persun - 12/18/2006 10:55:56 AM
   
Re: Splitting main menu into two parts
Alright, I have added a custom field "ShowInSubMenu" (boolean) to the document type Page (menu item) and it shows up fine in the Form tab for each page. However, when trying to add a WHERE condition to my main menu I run into trouble.

The WHERE condition "ShowInSubMenu = 0" gives the following error:

CMS.DataProviderSQL.ExecuteQuery: Query: SELECT * FROM View_CMS_Tree_Joined_Versions WHERE ( (DocumentMenuItemHideInNavigation = 0 or DocumentMenuItemHideInNavigation IS NULL) AND (classname IN ('CMS.MenuItem')) ) AND (ShowInSubMenu = 0)) AND (SiteName = N'MalaGS')AND (NodeAliasPath LIKE N'/%') AND (DocumentCulture = N'en-US') AND (NodeLevel <= 1) ORDER BY NodeOrder, DocumentName: caused exception: Incorrect syntax near ')'.

...and it seems to be caused by an extra right parenthesis added by the system after my WHERE condition. So I add an additional left parenthesis to compensate and I get this instead:

CMS.DataProviderSQL.ExecuteQuery: Query: SELECT * FROM View_CMS_Tree_Joined_Versions WHERE ( (DocumentMenuItemHideInNavigation = 0 or DocumentMenuItemHideInNavigation IS NULL) AND (classname IN ('CMS.MenuItem')) ) AND ((ShowInSubMenu = 0)) AND (SiteName = N'MalaGS')AND (NodeAliasPath LIKE N'/%') AND (DocumentCulture = N'en-US') AND (NodeLevel <= 1) ORDER BY NodeOrder, DocumentName: caused exception: Invalid column name 'ShowInSubMenu'.

What's the deal here? What am I doing wrong?

Thanks,

Per

User avatar
Guest
admin - 12/20/2006 7:47:52 AM
   
Re: Splitting main menu into two parts
I'm sorry, I've just realized that I pointed you in a wrong direction. This is possible only if you use the Repeater web part where you can use custom fields in the WHERE condition.

For the menu web parts, it's necessary to place the other menu group into a subfolder.

I'm sorry for the confusion.

Best Regards,