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

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 18 2025 19:30:09
Script start
Timing: Jan 18 2025 19:30:09
Module start 'layout'
Timing: Jan 18 2025 19:30:09
Module start 'content'
Timing: Jan 18 2025 19:30:09
Module end 'content'
Timing: Jan 18 2025 19:30:09
Script end

Main resources:

Total runtime0.0248 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0104 587.9063152.6250
Module start 'layout' 0.01040.0029 740.531339.4453
Module start 'content' 0.01330.0093 779.976689.4297
Module end 'content' 0.02250.0023 869.406334.3047
Script end 0.0248  903.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002610.5963140.0002
Check MTime0.00114.5380140.0001
Mysql Total
Database connection0.004317.302510.0043
Mysqli_queries0.003313.151430.0011
Looping result0.00000.055710.0000
Template Total0.00187.210.0018
Template load0.00093.820110.0009
Template processing0.00083.397710.0008
Override
Cache load0.00072.721110.0007
General
dbfile0.00176.671780.0002
String conversion0.00000.036540.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