hierarchical menu

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Re: hierarchical menu

Postby rabbeltje » Tue May 18, 2010 9:46 am

sorry to have confused you! i meant to post the getpagelist as a working example i have somewhere else, and that i tried to use it in the menu. so if i understand correctly, i won't be able to use the extra-image in the menu?
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: hierarchical menu

Postby hansfn » Tue May 18, 2010 10:00 am

No, not in the current version of the menu snippet. We need to add support for %page.whatever% which makes sense to add, I guess. I'll see if I can do it tonight.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: hierarchical menu

Postby rabbeltje » Tue May 18, 2010 10:06 am

oh you don't have to rush it on my account! i'd feel guilty! (if i'd have the money i really would make a donation :( )
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: hierarchical menu

Postby Gerard113 » Sun May 30, 2010 4:14 pm

Just want to ask a question,

when i use the code as suggested in the hook_menu.php i only get the menu of the first chaper

I have 3 chapers with 2 pages into it and the chapter have different folloing numbers and the first chapter is the firstchapter as mengioned in the code.

What am i doing wrong?

Code: Select all
[[ menu
firstchapter="Locatie"
toplevelbegin="<strong>%chaptername%</strong><br /><small>%description%</small><ul>"
toplevelitem="<li %active%><a href='%link%'>%title%</a>%sub%</li>"
toplevelend="</ul>"
sublevelbegin="  <ul>"
sublevelitem="  <li %active%><a href='%link%'>%title%</a>%sub%</li>"
sublevelend="  </ul>"
isactive="class='activemenu'"
sort="title"
]]


Greetings

Gerard
Gerard113
 
Posts: 183
Joined: Fri Aug 07, 2009 9:58 pm
Location: nederland

Re: hierarchical menu

Postby hansfn » Sun May 30, 2010 5:13 pm

You don't tell us anything about the names of your pages and chapters. To get a hierarchical menu some of the pages in the first chapter has to be named the same as one of the chapters - as illustrated in the beginning of extensions/menu/snippet_menu.php (named hook_menu.php in older versions). Yes, I'll extract the example out of that file and make some proper documentation real soon ;-)
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: hierarchical menu

Postby Gerard113 » Sun May 30, 2010 10:00 pm

Hans,

first chapter is called 'Locatie' with two pages called ahoy and arena
second chapter is called 'concert' with two pages called sting and police.

That's why i don't understand whats going wrong.

can you tell me where to donwload the snippet_menu, because it is not included in the 2.1 beta 7 version and also not on the extensions page.

Greetings,

Gerard
Gerard113
 
Posts: 183
Joined: Fri Aug 07, 2009 9:58 pm
Location: nederland

Re: hierarchical menu

Postby hansfn » Sun May 30, 2010 10:19 pm

PivotX 2.1.0 beta 7 doesn't include the menu extension at all - it has been removed from the core to make a smaller download. You don't need extensions/menu/snippet_menu.php - it was just renamed because the extension is a snippet, not a hook.

I guess you have read the example in the beginning of extensions/menu/hook_menu.php (or snippet), right, but you just haven't understood it? The extension is a trick to create a hierarchy even if PivotX doesn't support that ...

first chapter is called 'Locatie' with two pages called ahoy and arena
second chapter is called 'concert' with two pages called sting and police.

OK, but I just told you that "some of the pages in the first chapter has to be named the same as one of the chapters". You haven't done that, have you, and hence the extension can't create a hierarchical menu for you. Try to insert a page named "concert" in the first chapter ...
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: hierarchical menu

Postby Harm10 » Mon Jul 09, 2012 10:27 am

ivyjuly wrote:i can't seem to figure out how to keep the menu expanded for the chapter the page i'm looking at belongs to. if that makes any sense...

No that doesn't make much sense. Please elaborate (and remove the links from your signature to avoid getting banned......) :(
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Previous

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 2 guests

cron