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

eZ debug

Timing: Jan 31 2025 01:17:01
Script start
Timing: Jan 31 2025 01:17:01
Module start 'content'
Timing: Jan 31 2025 01:17:01
Module end 'content'
Timing: Jan 31 2025 01:17:01
Script end

Main resources:

Total runtime0.2231 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 588.0313370.2891
Module start 'content' 0.00730.0158 958.32031,009.6563
Module end 'content' 0.02310.1999 1,967.97663,897.6172
Script end 0.2230  5,865.5938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00472.1093200.0002
Check MTime0.00170.7661200.0001
Mysql Total
Database connection0.00090.424110.0009
Mysqli_queries0.119853.68081410.0008
Looping result0.00160.73331390.0000
Template Total0.199489.410.1994
Template load0.00080.345610.0008
Template processing0.198789.058110.1987
Override
Cache load0.00050.245710.0005
Sytem overhead
Fetch class attribute can translate value0.00190.831910.0019
XML
Image XML parsing0.00040.192310.0004
General
dbfile0.00964.3067200.0005
String conversion0.00000.002430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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