crumbs path generation

Author Message

Gerhard Hoogterp

Thursday 20 February 2003 6:14:20 am

I vagualy remember reading a mail/page here somewhere where someone gave a sollution for generating a crumbs-path to the current page.
Something alike $node.path_identification_string but then with clickable items.

As I cannot find that code/page/message back, does anybody know what I'm talking about OR have a sollution? For now I only see a recursive sollution and as I'm still in a load of problems with simple sequences it's somewhat above my abbilities for now.

Thanks,
Gerhard

Karsten Jennissen

Thursday 20 February 2003 7:29:42 am

> I vagualy remember reading a mail/page here somewhere where
> someone gave a sollution for generating a crumbs-path to the
> current page.
> Something alike $node.path_identification_string but then
> with clickable items.
>
> As I cannot find that code/page/message back, does anybody
> know what I'm talking about OR have a sollution? For now I
> only see a recursive sollution and as I'm still in a load of
> problems with simple sequences it's somewhat above my
> abbilities for now.
>
> Thanks,
> Gerhard

Hi,

whats a crumbs path?

Karsten

Paul Borgermans

Thursday 20 February 2003 7:35:24 am

> > I vagualy remember reading a mail/page here somewhere
> where
> > someone gave a sollution for generating a crumbs-path to
> the
> > current page.
> > Something alike $node.path_identification_string but
> then
> > with clickable items.
> >
> > As I cannot find that code/page/message back, does
> anybody
> > know what I'm talking about OR have a sollution? For now
> I
> > only see a recursive sollution and as I'm still in a load
> of
> > problems with simple sequences it's somewhat above my
> > abbilities for now.
> >
> > Thanks,
> > Gerhard
>
> Hi,
>
> whats a crumbs path?
>
> Karsten

A navigation concept.

Something like

/ people > those who eat bread > and drop the crumbs to find their way back > Karsten

where you can click on the items to go "up" one or more levels. It also makes visible where you are and how you got there. Hence the "breadcrumbs" like in the classic fairy tale (Hans en Grietje in Dutch/Femish)

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Gerhard Hoogterp

Thursday 20 February 2003 11:16:15 am

> where you can click on the items to go "up" one or more
> levels. It also makes visible where you are and how you got
> there. Hence the "breadcrumbs" like in the classic fairy
> tale (Hans en Grietje in Dutch/Femish)

The story which I, purely coincidential, read to my children tonight..;)

For me it is a major piece of two concepts which I find very important within usability. The first is the navigational part. Imho navigation consists out of 3 pieces, where am I, how did I come here and where can I go. Crumbs solve the second item.

The second use is that it enables the user to learn about the overal structure of the site. With every use, the site becomes more charted territory and less undiscovered land.

Anyhow, my problem is that it's easy to find the parent of the current node.. So till 3 levels (root/parent/current) deep it's easy, but after that the problems start.
In PHP I would simply make a do {} while loop and keep a pointer until it reaches the root. But how to do something like that in the template language. I thought I saw a sollution here somewhere, but cannot find it back..

So if anyone has a sollution/pointer..

Gerhard

Bruce Morrison

Thursday 20 February 2003 2:18:13 pm

> > where you can click on the items to go "up" one or more
> > levels. It also makes visible where you are and how you
> got
> > there. Hence the "breadcrumbs" like in the classic fairy
> > tale (Hans en Grietje in Dutch/Femish)
>
> The story which I, purely coincidential, read to my children
> tonight..;)
>
> For me it is a major piece of two concepts which I find very
> important within usability. The first is the navigational
> part. Imho navigation consists out of 3 pieces, where am I,
> how did I come here and where can I go. Crumbs solve the
> second item.
>
> The second use is that it enables the user to learn about
> the overal structure of the site. With every use, the site
> becomes more charted territory and less undiscovered land.
>
> Anyhow, my problem is that it's easy to find the parent of
> the current node.. So till 3 levels (root/parent/current)
> deep it's easy, but after that the problems start.
> In PHP I would simply make a do {} while loop and keep a
> pointer until it reaches the root. But how to do something
> like that in the template language. I thought I saw a
> sollution here somewhere, but cannot find it back..
>
> So if anyone has a sollution/pointer..

I'm guessing you are looking for something like this...

{section name=Path loop=$module_result.path offset=2 show=eq($DesignKeys:used.viewmode,'full')}
{section show=$Path:item.url}
<a class="small" href={$Path:item.url|ezurl}>{$Path:item.text}</a>
{section-else}
<span class="small">{$Path:item.text}</span>
{/section}

{delimiter}
<span class="small">/</span>
{/delimiter}
{section-else}
{section name=Path loop=$module_result.path}
{section show=$Path:Path:item.url}
<a class="small" href={$Path:item.url|ezurl}>{$Path:Path:item.text}</a>
{section-else}
<span class="small">{$Path:Path:item.text}</span>
{/section}

{delimiter}
<span class="small">/</span>
{/delimiter}
{/section}
{/section}

...taken from the demo templates.

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Gerhard Hoogterp

Friday 21 February 2003 1:47:37 am

> ...taken from the demo templates.

Thanks! I knew I had seen it somewhere..

Stephan Brezinsky

Saturday 21 February 2004 10:35:03 am

oops, nevermind.

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 11:22:25
Script start
Timing: Jan 18 2025 11:22:25
Module start 'layout'
Timing: Jan 18 2025 11:22:25
Module start 'content'
Timing: Jan 18 2025 11:22:25
Module end 'content'
Timing: Jan 18 2025 11:22:25
Script end

Main resources:

Total runtime0.0165 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.0050 589.3438152.6250
Module start 'layout' 0.00500.0030 741.968839.4609
Module start 'content' 0.00800.0053 781.429797.3359
Module end 'content' 0.01340.0031 878.765642.3047
Script end 0.0164  921.0703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002917.8123140.0002
Check MTime0.00127.1432140.0001
Mysql Total
Database connection0.00052.787510.0005
Mysqli_queries0.002515.136330.0008
Looping result0.00000.127410.0000
Template Total0.002213.510.0022
Template load0.00095.430110.0009
Template processing0.00137.993210.0013
Override
Cache load0.00063.833010.0006
General
dbfile0.00021.361280.0000
String conversion0.00000.050740.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