Forums / Setup & design / toppath - without root folder?

toppath - without root folder?

Author Message

Stefan van Zwoll

Tuesday 25 November 2003 11:07:11 am

hello everyone,

i've got the following problem:

this is my toppath.tpl-file:

{let name=Path
use_urlalias=ezini('URLTranslator','Translation')|eq('enabled')}

 
{section loop=$module_result.path}
{section show=$:item.url}
<a class="kopf" href={cond( and( $:use_urlalias, is_set( $:item.url_alias ) ), $:item.url_alias,
$:item.url )|ezurl}>{$:item.text|shorten( 18 )|wash}</a>
{section-else}
{$:item.text|wash}
{/section}

{delimiter}
<span class="kopf">|</span>
{/delimiter}
{/section}
 

{/let}

it displays a line with the full path starting with the root folder. is there a way to tell ezp3.2 that it displays the path without the root folder as the top node? (my starting page is a "home"-folder in the root folder)

thank you in advance.
stefan

Claus Jensen

Wednesday 26 November 2003 1:50:05 am

Hi Stefan,
sure it is. If you put a section show in there like this:
{section loop=$module_result.path}
{* SHOW, IF YOUR NODE ID IS NOT 2, NORMALLY ROOT FOLDER*}
{section show=ne($:item.node_id, 2)}

{section show=$:item.url}
<a class="kopf" href={cond( and( $:use_urlalias, is_set( $:item.url_alias ) ), $:item.url_alias,
$:item.url )|ezurl}>{$:item.text|shorten( 18 )|wash}</a>
{section-else}
{$:item.text|wash}
{/section}

{delimiter}
<span class="kopf">|</span>
{/delimiter}
{/section} {*END SECTION *}
{/section}

or something like that.
ps. did not test this, but in prinsiple this should work I think.

regards,
claÜs

Stefan van Zwoll

Wednesday 26 November 2003 7:11:56 am

thank you claus, worked out well for me!

Marco Zinn

Wednesday 26 November 2003 2:57:03 pm

Instead of checking for a node, you also could use the offset parameter of the "section" command.
Something like
{section loop=<path> offset=1}
should skip the first item in the list, which probably is "root" ;)
We use this to skip the first 1 or 2 levels of longs paths.

Marco
http://www.hyperroad-design.com

eZ debug

Timing: Jan 19 2025 15:24:58
Script start
Timing: Jan 19 2025 15:24:58
Module start 'content'
Timing: Jan 19 2025 15:24:59
Module end 'content'
Timing: Jan 19 2025 15:24:59
Script end

Main resources:

Total runtime1.0911 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 590.0859180.8359
Module start 'content' 0.00520.9847 770.9219591.0625
Module end 'content' 0.99000.1010 1,361.9844333.4063
Script end 1.0910  1,695.3906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3225210.0002
Check MTime0.00130.1229210.0001
Mysql Total
Database connection0.00060.056010.0006
Mysqli_queries1.026894.10681990.0052
Looping result0.00150.13411970.0000
Template Total1.067797.920.5338
Template load0.00170.153220.0008
Template processing1.066097.701120.5330
Template load and register function0.00010.008510.0001
states
state_id_array0.00070.063210.0007
state_identifier_array0.00090.084120.0005
Override
Cache load0.00140.1321570.0000
Sytem overhead
Fetch class attribute can translate value0.00120.111740.0003
Fetch class attribute name0.00080.070250.0002
XML
Image XML parsing0.00090.085940.0002
class_abstraction
Instantiating content class attribute0.00000.002550.0000
General
dbfile0.00760.6920270.0003
String conversion0.00000.000330.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs