Forums / Setup & design / hide current node path

hide current node path

Author Message

Stephane Persyn

Saturday 29 August 2009 6:38:45 pm

Hi, i did some research in both forums and articles, but didn't find any such topic.

I want to hide the path of current content viewed (located just under the horizontal menu) in ezwebin extension...

I heve created a "restricted section" from my own, with a policy even for anonymous users so that they can still read the content of a certain class within this restricted section.

so while they see any content from this class in the fonrt page is fine, if they click on it, they can see the default view of the class. Unfortunately, they can see the path to the content which is not suitable, as they might be tempted to click on the parent node link, which belongs to the restricted section, but is not an alllowed class in the role policies of the user.

BTW, seems only objects from the built- in folder class and its sub items have this small "path menu" appearing.

here's my node tree:
homepage (standard section, frontpage class) --> my folder container (restricted section, folder class) --> my allowed items (restricted section, my customized and allowed class).

Hope my explanations are crystal clear (but I doubt it :)).

Any help will be pretty much appreciated.

André R.

Sunday 30 August 2009 5:24:42 am

There are a couple of ways to do that, the easiest would be to do it in CSS, since you have everything you need on the <div id="page"> tag, example on standard section:

<!-- Change between "sidemenu"/"nosidemenu" and "extrainfo"/"noextrainfo" to switch display of side columns on or off  -->
<div id="page" class="nosidemenu noextrainfo section_id_1 subtree_level_0_node_id_2">

So if your restricted section has id 5 you'll need something like:

div#page.section_id_5 div#path { display: none; }

For more: http://ez.no/developer/articles/how_to_skin_an_ez_publish_now_site

The alternative would be to override the path template and introduce your own logic there.
Or if your using webin 1.4 or higher you can do the same in the user class template as is done in the full node view template of the 'frontpage' content class, which is:

{set scope=global persistent_variable=hash('left_menu', false(),
                                           'extra_menu', false(),
                                           'show_path', false())}

(you probably only need 'show_path', but I post the whole thing in case you want full page width)
But that is a bit big subject on a sunday, so take a look here for how to work with templates:
http://ez.no/ezpublish/documentation/building_an_ez_publish_site/prerequisits

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom