Forums / Setup & design / Second menu

Second menu

Author Message

Sébastien CAS

Tuesday 28 February 2006 12:53:34 pm

Hello,

Is it possible to create an other menu with ez publish ?

Is it possible to have a first menu on the top of my site and second, which is totally different on the left of my site.

Thanks,

Felix Laate

Tuesday 28 February 2006 10:48:22 pm

HI there,

it is certainly possible. You simply make some code that fetches the list of objects you need in your menu and then loop through it, making it the way you whant it. You can make any menu that you what, be it a simple list or a complicated javascript/css menu.

Do you need examples? What kind do you need?

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Sébastien CAS

Wednesday 01 March 2006 12:20:38 am

In fact, I must create class"item".
I will create a folder "second menu" and I will put itself some items.

And in my template, I am able to list them.

No ?

Could you give me an small example ? A simple list of link.

thank you very much

Felix Laate

Wednesday 01 March 2006 2:48:37 am

Hi again,

then put something like this into your paglayout (or preferably an override):

{let menu1=fetch( 'content', 'list', hash(parent_node_id, _THE_NODE_OF_THE_FOLDER_,
sort_by, array( priority, true ),
class_filter_type, include, 
class_filter_array, array( _CLASS_ID_ )))}
<ul>
{foreach $menu1 as $menuitem1}
<li>&rsaquo;&nbsp;</span><a href = "/{$menuitem1.url_alias}">{$menuitem1.name}</a></li>
{/foreach}
</ul>
{/let}

This is only an example of course.. hope it helps you!

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Sébastien CAS

Wednesday 01 March 2006 12:57:00 pm

Hello !

I've got a problem... ;-)

My example :

Root
- Folder 1
- Folder 2
- Folder 3
- Folder 4
- Folder 5
- Folder 6
- Folder 7

I want a first menu :
Folder 1 | Folder 2 | Folder 3

And a second menu :
Folder 5 | Folder 6 | Folder 7

But I obtain a first menu like that :
Folder 1 | Folder 2 | Folder 3 | <b>Folder 4</b>

I don't want to show Folder 4. And when I hide this folder, the second menu is hidden too.

When I am on page Folder 7, the path is :
root / Folder 4 / Folder 7

But I want obtain a path like :
root / Folder 7

I search a clean solution.

An idea ?

Sébastien.

Felix Laate

Wednesday 01 March 2006 11:27:38 pm

Hi again,

you can use the max and offset parameters as specified in http://ez.no/doc_hidden/ez_publish/technical_manual/3_6/reference/template_control_structures/looping/foreach

Use

{foreach $menu1 as $menuitem1 max 3}

for the first and

{foreach $menu1 as $menuitem1 offset 4}

for the second..

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com