Forums / Developer / Breadcrumb's problem : please help!

Breadcrumb's problem : please help!

Author Message

SathishKumar Subramanian

Thursday 08 January 2004 11:12:17 pm

Hi,
In breadcrumb , the $module_result.path is not providing the path array. How can I get?

I using the following code to show the breadcrumb in my page. If my current page is the homepage (Node:115) then I am not showing the breadcrumb.

{section show=ne($node.node_id,115)}
<a href="/">Home</a>
{section name=Path loop=$module_result.path offset=1 max=-1}
<span style="color: black"> > </span> <a href={$Path:item.url|ezurl}>{$Path:item.text}</a>
{/section}
{/section}

Please help to solve this. Thanx in advance! :)

Sathizh

Claus Jensen

Friday 09 January 2004 1:42:10 am

Hello,
Have you looked in the page_toppath.tpl for tips? Its the default "crumb-maker" for ez. But personally I think you are not in the correct namespace. First you have a section without any name, and inside this you have another one with name=Path. So you're code should not be $Path:item.text, but $:Path:item.text...i believe.

see this:http://ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/basics/namespaces_

--added:
Also you might check for $module_result.path value by doing a {$module_result.path|attribute(show)}

cheers,
claÜs

SathishKumar Subramanian

Friday 09 January 2004 3:09:53 am

Hi,

Thanks for your reply. I had checked that page_toppath.tpl . Also in my breadcrumb code I tried to get path details using the namespace correction and tried with {$module_result.path|attribute(show)} to get $module_result details. But not succeeded.
current code :

{section show=ne($node.node_id,115)}
<a href="/">Home</a>
{section name=Path loop=$module_result.path offset=1 max=-1}
<span style="color: black"> > </span> <a href={$:Path:item.url|ezurl}>{$:Path:item.text}</a>
{/section}
{/section}

But while using the following code I can get the actual folder paths

{section show=is_set($DesignKeys:used.node)}
{let node=fetch(content,node,hash(node_id,$DesignKeys:used.node))}
{section name=Node loop=$node.path_array}
{section-exclude match=array(1,2)|contains($:item)} {* Skip root nodes *}
{* Replace the next line with something that fetches translations *}
{fetch(content,node,hash(node_id,$:item)).name}
{/section}
{/let}
{section-else}
{* Show normal path *}
{/section}

Could you please provide additional info to get the breadcrumbs?

Sathizh

Paul Forsyth

Thursday 18 March 2004 9:43:46 am

Which template are you using to write your breadcrumbs with? Is it a template override?

paul

eZ debug

Timing: Jan 18 2025 21:04:20
Script start
Timing: Jan 18 2025 21:04:20
Module start 'content'
Timing: Jan 18 2025 21:04:20
Module end 'content'
Timing: Jan 18 2025 21:04:20
Script end

Main resources:

Total runtime0.8963 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.0079 587.7188180.8281
Module start 'content' 0.00790.7513 768.5469526.9297
Module end 'content' 0.75930.1369 1,295.4766334.1250
Script end 0.8962  1,629.6016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00490.5478210.0002
Check MTime0.00180.1961210.0001
Mysql Total
Database connection0.00120.131810.0012
Mysqli_queries0.814790.89641990.0041
Looping result0.00200.22451970.0000
Template Total0.857695.720.4288
Template load0.00310.342120.0015
Template processing0.854595.343420.4273
Template load and register function0.00020.018610.0002
states
state_id_array0.00150.166410.0015
state_identifier_array0.00140.151120.0007
Override
Cache load0.00260.2920500.0001
Sytem overhead
Fetch class attribute can translate value0.00140.152540.0003
Fetch class attribute name0.00110.118540.0003
XML
Image XML parsing0.00070.083240.0002
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00420.4740210.0002
String conversion0.00000.000830.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
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/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: 24
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs