掲示板

Multiple navigation root

thumbnail
14年前 に Zsolt Balogh によって更新されました。

Multiple navigation root

Expert 投稿: 463 参加年月日: 09/03/23 最新の投稿
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
14年前 に Lisa Simpson によって更新されました。

RE: Multiple navigation root

Liferay Legend 投稿: 2034 参加年月日: 09/03/05 最新の投稿
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
14年前 に Zsolt Balogh によって更新されました。

RE: Multiple navigation root

Expert 投稿: 463 参加年月日: 09/03/23 最新の投稿
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
14年前 に Denis Signoretto によって更新されました。

RE: Multiple navigation root

Expert 投稿: 375 参加年月日: 09/04/21 最新の投稿
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
14年前 に Zsolt Balogh によって更新されました。

RE: Multiple navigation root

Expert 投稿: 463 参加年月日: 09/03/23 最新の投稿
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