Forums / General / Section filter for displaying menu

Section filter for displaying menu

Author Message

Jeremy A

Friday 25 July 2008 2:34:05 am

Hi,

Currently I have 2 sections : private (id=7) and public (id=8).
In the menu (flat_top.tpl) it displays both section in one block.
I would like to display only one section (i.e. the public one at the left and the private one at the right)

I have debug the template like this :

{$item|attribute( 'show','2')}

$item is a link of the menu.

Then I found <i>>section_id</i> = 7 or 8, depends on the section.

So I'd like to add a thing like

{if eq( $item.section_id, '8' ) }      // displays only public section 

But it does not work, it never goes inside the if.

How could I get the section_id ?

Thank you.

Jeremy A

Monday 28 July 2008 1:28:33 am

Please can somebody help me ?

Ivo Lukac

Monday 28 July 2008 2:00:35 am

Hi Jeremy,

Section is attribute of object, so try:

{if eq($item.object.section_id,7)}
 

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Jeremy A

Monday 28 July 2008 3:03:05 am

Thank you =)