Forums / General / hide a folder and use it for latest news
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
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?
thanksPaul Bolger
Paul Bolger