Forums / General / hide a folder and use it for latest news

hide a folder and use it for latest news

Author Message

Ndjientcheu Patrick

Tuesday 27 February 2007 3:56:00 am

hi,
In the content struture of my site,I have the following folders:
- Enterprise
- Products
- Services
- Customers
- News

I want that the "news" item doesn't appear in the main menu, but be used to fill the "latest news" toolbar.

I've tried to hide the "news" folder in the content structure so that it will not appear in the main menu,but this action also prevents this folder to fill the "latest news" toolbar.

Is there another way to achieve this?

Thanks.

Claudia Kosny

Tuesday 27 February 2007 5:12:43 am

Hi

If your customer should never see a full news article, you can set the news folder to hidden and add a 'ignore_visibility' parameter to the fetch function for the latest news.

If your news listing displays just the intro of the news articles so your customer needs to be able to see the full news article, I would just exclude this news folder from the main menu. Easiest way would be to check for the node id in the loop where the menu entries are created. If the node id is the same as the node id of the news folder, don't display anything.

Claudia

Paul Borgermans

Tuesday 27 February 2007 6:12:04 am

You could also clone the folder class and exclude this class from the menu/navigation or even make it so that end-users are not allowed to see objects of this class. Thi sneeds only editing ini files or the roles/policies.

That's what I did for a similar situation in which I had to hide a "container" without preventing read-access to the items below it. In my use-case, editors are seeing this cloned folder objects, regular users not.

hth

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Ndjientcheu Patrick

Friday 09 March 2007 8:59:18 am

hi,
thanks for you help.I finally solve my problem.As Claudia suggested to me,I excluded the "news" folder in the loop where menu entries are created. To do his, I just edit the menu.ini.append.php file,in the excluded section:
[Excluded]
Node[]
Node[]=92

where 92 is the number of the "news" node.

Note that i'm using the dynamic top rollover menu.After that,I also edit the file dynamic_double_top_rollover.tpl (<Siteroot>\extension\dynamicdoubletopmenu\design\base\templates\menu) so that it doesn't display excluded items.I just comment lines which did it.

That's all.

Thanks again for your help.

Xavier Dutoit

Saturday 10 March 2007 1:15:58 am

What I do in these cases is to put the news folder in the media

http://www.sydesy.com

paul bolger

Thursday 26 April 2007 11:37:53 pm

Hi Ndjientcheu

I tried your [exclude] method with a flat_left menu and couldn't get it to work. Can you give any more detail?

thanks
Paul Bolger

Paul Bolger

eZ debug

Timing: Jan 18 2025 16:09:31
Script start
Timing: Jan 18 2025 16:09:31
Module start 'content'
Timing: Jan 18 2025 16:09:32
Module end 'content'
Timing: Jan 18 2025 16:09:32
Script end

Main resources:

Total runtime0.8525 sec
Peak memory usage4,096.0000 KB
Database Queries209

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 589.5938180.8203
Module start 'content' 0.00660.6928 770.4141695.7656
Module end 'content' 0.69940.1531 1,466.1797337.0781
Script end 0.8524  1,803.2578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4857210.0002
Check MTime0.00140.1645210.0001
Mysql Total
Database connection0.00110.130310.0011
Mysqli_queries0.767289.99272090.0037
Looping result0.00240.28252070.0000
Template Total0.824096.720.4120
Template load0.00210.241520.0010
Template processing0.821996.409920.4110
Template load and register function0.00010.014210.0001
states
state_id_array0.00090.107110.0009
state_identifier_array0.00100.114820.0005
Override
Cache load0.00170.2052460.0000
Sytem overhead
Fetch class attribute can translate value0.00130.151560.0002
Fetch class attribute name0.00110.1297100.0001
XML
Image XML parsing0.00240.283160.0004
class_abstraction
Instantiating content class attribute0.00000.0024110.0000
General
dbfile0.00320.3698460.0001
String conversion0.00000.000730.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 6

Time used to render debug report: 0.0005 secs