Forums de discussion

Multiple navigation root

thumbnail
Zsolt Balogh, modifié il y a 14 années.

Multiple navigation root

Expert Publications: 463 Date d'inscription: 23/03/09 Publications récentes
Hi,

We are over some liferay installation and customization project. In every project we needed to create themes with more navigation menus For example, besides the basic main menu, the page had a footer menu for landing pages.

With small hacks it's working (prefix the URL of the pages with the name of the menu, create a root page for each menu, etc.), but there's no good solution for this.

I was thinking on this, and I had this conclusion:

We should create a new Page type called Navigation Root Page. If you want to create a menu, create a "page" with this type and set the menu-name of that e.g. landingpages. Then, liferay sould put into the velocity context of the theme a new element called $landingpages. It should be the same structure as $nav_items.

This would make the footer and header menu editable on all sites.

I can write the code for it, but I don't want to create it if you don't like the idea - as it wouldn't be better to patch liferay always then the old hack solutions.

So, are there any chance that you will use my patch?
thumbnail
Lisa Simpson, modifié il y a 14 années.

RE: Multiple navigation root

Liferay Legend Publications: 2034 Date d'inscription: 05/03/09 Publications récentes
I totally get what you're saying so that you can define a global footer with stuff like your privacy policy in it and have that apply to the entire web site. Same goes for the header. SInce this is SUCH a common layout, especially with the "Web 2.0" crowd, I have to say that tentatively I think it would be a good thing.

How would you handle the people who want one header/footer for one section of their site and something different for another section?
thumbnail
Zsolt Balogh, modifié il y a 14 années.

RE: Multiple navigation root

Expert Publications: 463 Date d'inscription: 23/03/09 Publications récentes
Good question, I had an idea, but it was a hack after all, so here is the better solution:
The root navigation items should be the child of that page on which you want to use that menu. The menu root will be set for the children of that page too, so if you create a nice page structure, the menu will work automatically.

One example:
+ Language selector main page
+ Hungarian pages
[indent] + Page 1[/indent]
[indent] + Page 2[/indent]
[indent] + Page 3[/indent]
[indent] + Footer (menu name: footer)
[indent] + Copyright, etc [/indent]
[/indent]
+ English pages
[indent] + Page 1[/indent]
[indent] + Page 2[/indent]
[indent] + Page 3[/indent]
[indent] + Footer (menu name: footer)
[indent] + Copyright, etc [/indent]
[/indent]
+ Page selector footer (menu name: footer)
[indent] + Copyright, etc [/indent]

So, we will have 3 footer navigation, but in the theme it could be handled without programming as it has the same name - same variable $footer.

A child page should be able to overwrite the parent's menu (as the example shows).
thumbnail
Denis Signoretto, modifié il y a 14 années.

RE: Multiple navigation root

Expert Publications: 375 Date d'inscription: 21/04/09 Publications récentes
We had the same problem and solved creating a second level root hidden pages, one for every root menu we needs. I agree with your solution. It would be also nice having a flag to expand automatically a children trunk.
thumbnail
Zsolt Balogh, modifié il y a 14 années.

RE: Multiple navigation root

Expert Publications: 463 Date d'inscription: 23/03/09 Publications récentes
We have a 7 level deep page structure and now some ugly hacks because of the hidden pages. It's right time to start this project. emoticon