This tag allows you insert a "trace" of the user's most recently visited pages on the Wiki.

It requires cookies to function correctly. If the user has disabled cookies, no trail is generated.

This tag has been contributed by Ken Liu (ken at kenliu.net).


Usage#

<wiki:Breadcrumbs maxpages="<integer>" separator="<string>" />

Parameters#

maxpages
How many pages should we track? Default is 10 most recent pages.
maxpages doesn't appear to be honored.
separator
HTML snippet for what should be between the listed pages. Default is " | ".
trailtype=(visit|breadcrumb)
what kind of trail should be left. The default is breadcrumb, this shows all the pages, in order that they were displayed. If you display a page twice, there will be two entries in the breadcrumb. Using visit as the parameter shows the trail as all the pages that were visited. If you visit a page more than once, it is only shown once in the list.
trailtype doesn't appear to be implemented in the code.

Example#

Your trail: <wiki:Breadcrumbs />

Known bugs#

<wiki:Breadcrumbs /> Separator does not clean the HTML it is given - it is thus a security hazard.
8 August 2004
New version uploaded - change was the trailtype support. Tested against the 2.0.54 release, change the log statements to have it work with 2.1.103. -- Foster Schucker

About a year later, with vers. 2.2.28 I tried to use the trailtype attribute, but receive

"javax.servlet.ServletException: /templates/default/ViewTemplate.jsp(19,35)
Attribute trailtype invalid for tag Breadcrumbs according to TLD"

Could it be that the uploaded update has not been integrated into the distribution? Please someone check this! Thanks!

-- Gregor Hagedorn, 24 Aug. 2005


Regarding the FIXMEs in this code. How about something like this (tried in 2.1.106):

out.print(engine.textToHTML(m_wikiContext, "[" + curPage + "]"));

Instead of:

out.print("<a class=\"" + linkclass + "\" href=\"" + 
             engine.getViewURL(curPage)+ "\">" + curPage + "</a>");

Are the square brackets defined somewhere?

I haven't tested extensively to see what it breaks. It'd potentially allow non existant pages and attachments to show up in bread crumbs with their usual styles.


CategoryOfficialDocumentation


This tag allows you insert a "trace" of the user's most recently visited pages on the Wiki.

It requires cookies to function correctly. If the user has disabled cookies, no trail is generated.

This tag has been contributed by Ken Liu (ken at kenliu.net).


Usage#

<wiki:Breadcrumbs maxpages="<integer>" separator="<string>" />

Parameters#

maxpages
How many pages should we track? Default is 10 most recent pages.
separator
HTML snippet for what should be between the listed pages. Default is " | ".
trailtype=(visit|breadcrumb)
what kind of trail should be left. The default is breadcrumb, this shows all the pages, in order that they were displayed. If you display a page twice, there will be two entries in the breadcrumb. Using visit as the parameter shows the trail as all the pages that were visited. If you visit a page more than once, it is only shown once in the list.

Example#

Your trail: <wiki:Breadcrumbs />

Known bugs#

<wiki:Breadcrumbs /> Separator does not clean the HTML it is given - it is thus a security hazard.
8 August 2004
New version uploaded - change was the trailtype support. Tested against the 2.0.54 release, change the log statements to have it work with 2.1.103. -- Foster Schucker

About a year later, with vers. 2.2.28 I tried to use the trailtype attribute, but receive

"javax.servlet.ServletException: /templates/default/ViewTemplate.jsp(19,35)
Attribute trailtype invalid for tag Breadcrumbs according to TLD"

Could it be that the uploaded update has not been integrated into the distribution? Please someone check this! Thanks!

-- Gregor Hagedorn, 24 Aug. 2005


Regarding the FIXMEs in this code. How about something like this (tried in 2.1.106):

out.print(engine.textToHTML(m_wikiContext, "[" + curPage + "]"));

Instead of:

out.print("<a class=\"" + linkclass + "\" href=\"" + 
             engine.getViewURL(curPage)+ "\">" + curPage + "</a>");

Are the square brackets defined somewhere?

I haven't tested extensively to see what it breaks. It'd potentially allow non existant pages and attachments to show up in bread crumbs with their usual styles.


CategoryOfficialDocumentation

--AnonymousCoward, 08-Sep-2009 15:30

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
java
BreadcrumbsTag.java 5.8 kB 1 09-Aug-2004 05:35 FosterSchucker
« This page (revision-18) was last changed on 18-May-2012 14:56 by 213.122.174.85