Forums / Setup & design / Looking for a way to hide a content

Looking for a way to hide a content

Author Message

Negin Javadi

Wednesday 23 February 2005 1:18:24 am

Hi
when I creat a folder in my site it's name atoumatically appears in the top menu Is there anyway to add a folder to the site without showing it in the top menu?

n_j1981[at]yahoo[dot]com

Gabriel Ambuehl

Wednesday 23 February 2005 1:49:16 am

You can look into menu.ini for what gets displayed where. Also, in 3.5 you can click on icon in the the rightside tree menu and a context menu with hide functionality pops up.

Visit http://triligon.org

Łukasz Serwatka

Wednesday 23 February 2005 2:31:13 am

If you use hide functionality then hidden object will be inaccessable via url. Better way is use menu.ini as Gabriel wrote or modify double_top.tpl file.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Negin Javadi

Saturday 26 February 2005 5:24:40 am

thanks for your replies but if Iedit the menu.ini I couldn,t show any content from that type for example"folder" but I just want to hide 1 folder ,what will be the solution?

n_j1981[at]yahoo[dot]com

Gabriel Ambuehl

Saturday 26 February 2005 6:31:38 am

Easiest solution is to make it another class.

Visit http://triligon.org

Ulrich L.

Saturday 26 February 2005 11:19:07 am

Look here, this seems to be a similar question, the solution is much easier than it looks like at the first glance...

http://www.ez.no/community/forum/setup_design/left_menu_exclude_a_node

Łukasz Serwatka

Saturday 26 February 2005 12:53:50 pm

Setup->Classes

Edit your folder class and add checkbox called "Show in menu" (show_in_menu)
By default checkbox is checked.

Then replace code in design/base/templates/menu/double_top.tpl If you using double top menu


            	{section show=eq( sum( $menu.index, 1 ), $menuitems|count )}
           		 	<li class="last {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'selected' )}"><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
            	{section-else}
            		<li {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'class="selected"' )}><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
            	{/section}

with

		{section show=$menu.object.data_map.show_in_menu.data_int}
            	{section show=eq( sum( $menu.index, 1 ), $menuitems|count )}
           		 	<li class="last {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'selected' )}"><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
            	{section-else}
            		<li {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'class="selected"' )}><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
            	{/section}
		{/section}

If you usign design/base/templates/menu/flat_top menu replace

                {section show=eq( sum( $menu.index, 1 ), $menuitems|count )}
                <li class="last {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'selected' )}"><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
                {section-else}
                <li {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'class="selected"' )}><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
                {/section}

With

{section show=$menu.object.data_map.show_in_menu.data_int}
                {section show=eq( sum( $menu.index, 1 ), $menuitems|count )}
                <li class="last {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'selected' )}"><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
                {section-else}
                <li {eq( $module_result.path[1].node_id, $menu.node_id )|choose( '', 'class="selected"' )}><div class="spacing"><a href={$menu.url_alias|ezurl}>{$menu.name|wash}</a></div></li>
                {/section}
{/section}

If show_in_menu flag is set to true (checked) item is show in menu.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Negin Javadi

Sunday 27 February 2005 1:46:20 am

again thanks for the replies,I tried to edit my folder class as Lukasz said but in this way I will lost the sub folders in the menu I mean I wantted the sub folders to be like the folder but now they appear in the second level of the top menu which is not what I want.
so I created a new content class(myclass) which is exactly like folder but different in the name,then I created new pagelayout.tpl for a new section(my section) in my section I wanna show the content which are from myclass instead of folders in the top menu is there anyway to do this?(I wanna have 2 diffrent top menus for 2 different pagelayout.tpl)

n_j1981[at]yahoo[dot]com