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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 01:35:55
Script start
Timing: Jan 31 2025 01:35:55
Module start 'layout'
Timing: Jan 31 2025 01:35:55
Module start 'content'
Timing: Jan 31 2025 01:35:55
Module end 'content'
Timing: Jan 31 2025 01:35:55
Script end

Main resources:

Total runtime0.0278 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.2500151.2266
Module start 'layout' 0.00640.0037 739.4766220.7031
Module start 'content' 0.01000.0162 960.17971,005.9141
Module end 'content' 0.02630.0015 1,966.093841.9922
Script end 0.0278  2,008.0859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003010.6311140.0002
Check MTime0.00113.9397140.0001
Mysql Total
Database connection0.00082.982210.0008
Mysqli_queries0.003010.657730.0010
Looping result0.00000.093410.0000
Template Total0.00113.910.0011
Template load0.00082.970210.0008
Template processing0.00020.883010.0002
Override
Cache load0.00062.112010.0006
General
dbfile0.00031.016680.0000
String conversion0.00000.033440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs