TWiki
>
TWiki Web
>
BreadCrumbsPlugin
(22 Jan 2019,
TWikiAdminUser
)
(raw view)
---+!! <nop>%TOPIC% <!-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/BreadCrumbsPlugin or provide feedback at http://twiki.org/cgi-bin/view/Plugins/BreadCrumbsPluginDev. If you are a TWiki contributor please update the plugin in the SVN repository. --> %SHORTDESCRIPTION% <div style="float:right; background-color:#eeeeee; margin:0 0 20px 20px; padding: 0 10px 0 10px; width:380px"> %TOC{title="Page contents"}% </div> ---++ Description This plugin helps you to locate where you are, and shows you how you can escape from there using breadcrumbs navigation. Two types of breadcrumb are supported; "location" breadcrumbs, which show you where you are in the site hierarchy, taking into account topic parent relationships, and "path" breadcrumbs, that simply show you where you have been, but without going in circles. In a way, location breadcrumbs have always been supported by TWiki using the =META{"parent"}= variable to display the list of parent topics. Since version 4.x TWiki also supports hierarchical subwebs, but the breadcrumbs support of TWiki does not allow the display of parent webs as part of of the location breadcrumbs. Path breadcrumbs show you which topics you visited to reach the current topic. If you revisit a topic you visited earlier, the path is trimmed back to that topic, so it gives you a sort of visual history of where you have been on the site. Path breadcrumbs require that you have session support enabled. The plugin also gives a great deal of flexibility in deciding which parts of the breadcrumbs should be rendered, and how each individual breadcrumb is displayed. ---++ Configuration While most settings are given as part of the =BREADCRUMBS= tag, there are a few settings to improve rendering breadcrumbs. ---+++ Enabling Path breadcrumbs To switch on recording the path breadcrumbs, set the =BREADCRUMBSPLUGIN_RECORDTRAIL= to =on=. Otherwise the click path of the user won't be recorded and the =type= setting to the BREADCRUMBS will result in an undefined behaviour. ---+++ Displaying !TopicTitles !TopicTitles are a concept introduced by the TWiki:Plugins/DBCachePlugin. These are stored in a topic in the =TOPICTITLE= preference variable or in a formfield 'TopicTitle ' of a !TWikiForm attached to the topic. If a !TopicTitle is defined for a topicm, it will be displayed in the breadcrumbs instead of the normal !WikiWord topic name. For efficiency it is recommended to install the TWiki:Plugins/DBCachePlugin to determine the !TopicTitle. ---++ Syntax =%<nop>BREADCRUMBS%, %<nop>BREADCRUMBS{"<web>.<topic>" ...}%= *Parameters*: * =<web>.<topic>=: the location to which breadcrumbs should be generated (type="location" only, ignored if type="path") defaults to the current topic * =type=: "location" (the default) or "path" * =header=: format string prepended to the output result * =format=: format string to render one item on the breadcrumbs path (defaults to '[<nop>[$webtopic][$name]]') * =topicformat=: format string for any _topic_ items on the path; for example, parent topics. Defaults to the same as =format=. * =footer=: format string appended to the output result * =separator=: format string to be put between items (defaults to one space char) * =include=: regular expression that items must match to be part of the path * =exclude=: regular expression that items must _not_ match to be part of the path * =recurse=: (type="location" only)can be one or more of the following values (comma separated) to decide which parts of the breadcrumbs path should be included (defaults to 'on'): * =on=: include all parent webs and all parent topics * =off=: include only the current web and the current topic * =weboff=: don't recurse on webs, include only the current web * =topicoff=: don't recurse on topics, include only the current topic * =webonce=: include the next parent web but not the parent web's parent web * =topiconce=: include the next parent topic but not the parent topic's parent topic * =once=: short formf of =webonce, topiconce= * =spaceout=: space out !WikiWords inserting a separator (defaults to 'off') * =spaceoutsep=: separator to be used when spacing out !WikiWords * =maxlength=: maximum length of a breadcrumbs before inserting an ellipsis in the middle, 0 meaning disable this feature (defaults to 0) * =ellipsis=: character sequence to be inserted when reducing the maxlength of the breadcrumbs (defaults to ' ... ') *Pseudo-variables*: %BR% Each of the above format strings (format, header, footer, separator) may contain special variables: * =$name=: the name of the breadcrumb, this is the topic name or the web name having its parent web part being stripped off (that is =Bar= instead of =Sandbox/Foo/Bar=) * =$webtopic=: the full =web.topic= of the breadcrumb (twiki syntax) * =$target=: the full =web/topic= of the breadcrumb (url syntax) * =$name=: name of the breadcrumbs item this is the !TopicTitle, spaced out or normal topic name topic * =$n=: replaced with a newline char (\n) * =$percnt=: replaced with a percent char (%) * =$dollar=: replaced with a dollar char ($) * =$nop=: removed from the format string before expanding common TWiki variables ---++ Examples ---+++ default <verbatim> %BREADCRUMBS% </verbatim> %BREADCRUMBS% ---+++ path <verbatim> %BREADCRUMBS{type="path"}% </verbatim> %BREADCRUMBS{type="path"}% ---+++ breadcrumbs to a non-existent location <verbatim> %BREADCRUMBS{ "Web1/Web2/Web3.Topic" format="$name" separator=" » "}% </verbatim> %BREADCRUMBS{"Web1/Web2/Web3.Topic" format="$name" separator=" » "}% ----+++ recurse="off" <verbatim> %BREADCRUMBS{ "Web1/Web2/Web3.Topic" format="$name" separator=" » " recurse="off"}% </verbatim> %BREADCRUMBS{"Web1/Web2/Web3.Topic" format="$name" separator=" » " recurse="off"}% ----+++ recurse="once" <verbatim> %BREADCRUMBS{"Web1/Web2/Web3.Topic" format="$name" separator=" » " recurse="once"}% </verbatim> %BREADCRUMBS{"Web1/Web2/Web3.Topic" format="$name" separator=" » " recurse="once"}% ---+++ include <verbatim> %BREADCRUMBS{"Web1/Web2/Web3.Topic" format="$name" separator=" » " include="Web(1|3).*"}% </verbatim> %BREADCRUMBS{"Web1/Web2/Web3.Topic" format="$name" separator=" » " include=".*(1|3).*"}% ---+++ exclude <verbatim> %BREADCRUMBS{"Web1/Web2/Web3.Topic" format="$name" separator=" » " exclude="Web2"}% </verbatim> %BREADCRUMBS{"Web1/Web2/Web3.Topic" format="$name" separator=" » " exclude="Web2"}% ---++ Plugin Installation Instructions You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server where TWiki is running. Like many other TWiki extensions, this module is shipped with a fully automatic installer script written using the Build<nop>Contrib. * If you have TWiki 4.2 or later, you can install from the =configure= interface (Go to Plugins->Find More Extensions) * See the [[http://twiki.org/cgi-bin/view/Plugins/BuildContribInstallationSupplement][installation supplement]] on TWiki.org for more information. * If you have any problems, then you can still install manually from the command-line: 1 Download one of the =.zip= or =.tgz= archives 1 Unpack the archive in the root directory of your TWiki installation. 1 Run the installer script ( =perl <module>_installer= ) 1 Run =configure= and enable the module, if it is a plugin. 1 Repeat for any missing dependencies. * If you are *still* having problems, then instead of running the installer script: 1 Make sure that the file permissions allow the webserver user to access all files. 1 Check in any installed files that have existing =,v= files in your existing install (take care *not* to lock the files when you check in) 1 Manually edit !LocalSite.cfg to set any configuration variables. %IF{"defined 'SYSTEMWEB'" else="<div class='twikiAlert'>%X% WARNING: SYSTEMWEB is not defined in this TWiki. Please add these definitions to your %MAINWEB%.TWikiPreferences, if they are not already there:<br><pre> * <nop>Set SYSTEMWEB = %<nop>TWIKIWEB%<br> * <nop>Set USERSWEB = %<nop>MAINWEB%</pre></div>"}% ---++ Plugin Info * Set SHORTDESCRIPTION = A flexible way to display breadcrumbs navigation | Plugin Author: | TWiki:Main.MichaelDaum | | Copyright: | © 2006-2008, Michael Daum http://michaeldaumconsulting.com, %BR% © 2006-2010 TWiki:TWiki.TWikiContributor | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | Plugin Version: | 19303 (2010-08-01) | | Change History: | <!-- versions below in reverse order --> | | 2010-08-01: | TWikibug:Item6530 - doc fixes; changing TWIKIWEB to SYSTEMWEB | | 01 Sep 2008: | TWiki:Main.OliverKrueger Bugs:Item5972 fixed: minor cosmetics | | 28 Apr 2008: | many new features for 2.0: topic titles, ellipsis, ... | | 08 May 2007: | respect HOMETOPIC setting, don't hardcoded '<nop>WebHome' | | 19 Apr 2007: | TWiki:Main.CrawfordCurrie added =topicformat= | | 20 Feb 2007: | TWiki:Main.CrawfordCurrie added path breadcrumbs | | 18 Dec 2006: | added $webtopic pseudo-parameter | | 31 Aug 2006: | added NO_PREFS_IN_TOPIC; removed commonTagsHandler thus dropping cairo support | | 08 Aug 2006: | fixed topic parents not showing up; don't show non-existing topics | | 29 Jul 2006: | fixed infinit loop when a topic is its own parent topic | | 28 Jul 2006: | initial version; don't add the topic parent '<nop>WebHome' to the path | | CPAN Dependencies: | none | | Other Dependencies: | none | | Perl Version: | 5.8 | | TWiki:Plugins/Benchmark: | %SYSTEMWEB%.GoodStyle nn%, %SYSTEMWEB%.FormattedSearch nn%, %TOPIC% nn% | | Plugin Home: | http://twiki.org/cgi-bin/view/Plugins/%TOPIC% | | Feedback: | http://twiki.org/cgi-bin/view/Plugins/%TOPIC%Dev | | Appraisal: | http://twiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal |
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 22 Jan 2019
-
TWikiAdminUser
Home
Site map
JUNOProjectTemplateWeb web
TWiki web
TWiki Web
User registration
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Log In
Register User
Български
Cesky
Dansk
Deutsch
English
Español
_Français_
Italiano
日本語
한글
Nederlands
Polski
Português
Русский
Svenska
简体中文
簡體中文
E
dit
A
ttach
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.BreadCrumbsPlugin
.