Hi Pawel!
Take a look at the inherit function, i.e. something like:
[#assign inheritedMenus=mgnl.inherit(content).menu /]
[#assign firstMenu=inheritedMenus?first /]
(assuming your menus are stored in nodes named "menu")
This will allow you to define menus at the higher levels of the site hierarchy,
and "inherit" them in the subpages, but keep the ability to define a menu in
the subpage if you want to override the menu at any point.
Alternatively, you could store the menu once on your root node of your site,
and do something like:
[#assign theMenu=mgnl.getContent("/mysite").menu /]
In this case the menu will always be loaded from the node "/mysite".
Hope this helps,
Regards from Vienna,
Richard
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]]
Im Auftrag von
=?ANSI_X3.4-1968?Q?Magnolia_Forums_=28on_behalf_of_Pawe=3F_Maciszewski=29?=
Gesendet: Mittwoch, 31. August 2011 09:00
An: Magnolia User List
Betreff: [magnolia-user] One menu (manageable in one place) on more then one
page
I would like to get some help with one issue I faced. Imagine that I have a lot
of pages in magnolia. In some of those pages I have simple menu (no more then
10 items in menu). Each item point to single page and it is "active" (let say
css class) if user is on that particular page.
For now on I did that menu as a paragraph. But If user want to edit this menu
he has to do it as many times as much pages is with this menu.
I would like to do it is such a way that there will be one menu form all those
pages and also that user can edit this menu via magnolia (in one place for all
pages).
I use magnolia CE 4.4.2
I would be very thankfull for point me to some solution.
Thank you in advance
Pawel
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=8059a268-6de8-44f9-846d-32241cbf5822
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------