CMS Made Simple Forums
https://forum.cmsmadesimple.org/

PHPLayers: Using a subset of content to do a menu
https://forum.cmsmadesimple.org/viewtopic.php?f=4&t=661
Page 1 of 1

Author:  GarfielFr [ Mon Mar 14, 2005 11:19 pm ]
Post subject:  PHPLayers: Using a subset of content to do a menu

If you have a hierarchie of content like this:

\$1:
1.      Content 1
1.1     Content 1.1
1.1.1   Content 1.1.1
1.1.2   Content 1.1.2
1.1.3   Content 1.1.3
1.2     Content 1.2
1.3     Content 1.3
2.      Content 2
2.1     Content 2.1
2.1.1   Content 2.1.1
2.1.2   Content 2.1.2
2.1.3   Content 2.1.3
2.2     Content 2.2
2.3     Content 2.3


And you want a menu (horizontal by example) with main menu like this:
\$1:
Content 1.1     Content 1.2      Content 1.3


use this code:
\$1:
{cms_module module='phplayers' horizontal="1" start_element="1."}


Look the point (.) after 1 in start_element !!! if you forgot it you will get the menu:
\$1:
Content 1


with content 1.x as popup-menu but not main menu

usefull if you want a multi langual site, you build 2 hirarchie of content, one "en" and another "fr" and you do 2 templates one for "en" and one for "fr" with just the start_element different.

I hope it's not a bug :)

Author:  Ted [ Tue Mar 15, 2005 2:55 am ]
Post subject:  Re: PHPLayers: Using a subset of content to do a menu

It's definatly a bug, but a useful one.  :)

I'm working on a show_root_siblings parameter for bulletmenu right now.  I'll port it over to phplayers as well.  Basically, you'll be able to get the same function you describe above with: {cms_module module='phplayers' horizontal="1" start_element="1.1" show_root_siblings="1"}

Your fix is less code, but not quite as user friendly.

Thanks!

Author:  jptechnical [ Tue Mar 15, 2005 3:23 am ]
Post subject:  Re: PHPLayers: Using a subset of content to do a menu

I know I asked this before but I can't remember. Does/will the new bullet menu have an argument so it knows where it is without specifying the start_element?

i.e. I would like a template to be used with many content items with 2 child objects each. I would like to put the bulletmenu in the template to show the current page and the child pages only. Since it is in a template it would need to be able to determine where it is in relation to the content item displayed.

That make sense?

Thanks Wishy... you have got a kick ass project here!

Author:  Ted [ Tue Mar 15, 2005 3:33 am ]
Post subject:  Re: PHPLayers: Using a subset of content to do a menu

Set collapse='1' in your bulletmenu definition.  That was added in 0.9.2.

Hope that helps.  :)

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/