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