User:Barre/MediaWiki/Extensions/kw bread crumbs: Difference between revisions
m (→Examples) |
(fix template) |
||
Line 5: | Line 5: | ||
First, if everything is setup correctly, this extension should be in use on top of this page. Try navigating inside [[User:Barre]] and the [[kwGrid:Welcome|kwGrid]] sub-site to check how the trace | First, if everything is setup correctly, this extension should be in use on top of this page. Try navigating inside [[User:Barre]] and the [[kwGrid:Welcome|kwGrid]] sub-site to check how the trace | ||
evolves. The following code was used inside this page | evolves. The following code was used inside this page by include this [[:User:Barre/Template/Header|template]]: | ||
<pre> | <pre> | ||
<kw_bread_crumbs>prefix= | <kw_bread_crumbs>prefix=» |small=1|bgcolor=F9F9F9|trim_prefix=User:|on_top_hack=1</kw_bread_crumbs> | ||
</pre> | </pre> | ||
Note that the "User:" prefix is trimmed to leave only the user name, and that the trace is positioned | Note that the "User:" prefix is trimmed to leave only the user name, and that the trace is positioned |
Revision as of 17:20, 28 April 2005
<kw_bread_crumbs>prefix=» |small=1|bgcolor=F9F9F9|trim_prefix=User:|on_top_hack=1</kw_bread_crumbs> <kw_include_file>url=http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/scripts/media-wiki-extensions/kwBreadCrumbs.php?content-type=text%2Fplain&root=kwGridWeb%7Cpre=0%7Cwiki_markup=1%7Ccollapse_par=1%7Cpreg_match=/.*\/\*\s*(==.*?)^\*\//sm</kw_include_file>
Examples
First, if everything is setup correctly, this extension should be in use on top of this page. Try navigating inside User:Barre and the kwGrid sub-site to check how the trace evolves. The following code was used inside this page by include this template:
<kw_bread_crumbs>prefix=» |small=1|bgcolor=F9F9F9|trim_prefix=User:|on_top_hack=1</kw_bread_crumbs>
Note that the "User:" prefix is trimmed to leave only the user name, and that the trace is positioned on top of the page.
The following code will create the same trace again, with a different prefix, a different separator and no trim:
<kw_bread_crumbs>prefix=Trace: |separator= # |small=1</kw_bread_crumbs>
...is rendered as: <kw_bread_crumbs>prefix=Trace: |separator= # |small=1</kw_bread_crumbs>
The above examples use the current trace, i.e. the pages you have visited so far that make explicit use of this extension. If you have not moved around this site much, your trace might be a little too small to figure out what is going on. Here is a static example though. Say you had visited the following pages, in order: User:Barre, User:Barre/MediaWiki, User:Barre/MediaWiki/Extensions then this page, User:Barre/MediaWiki/Extensions/kw_bread_crumbs. The following code:
<kw_bread_crumbs>prefix=Trace: |trim_prefix=User:|small=1</kw_bread_crumbs>
...would have rendered your trace pretty much like this:
Trace: Barre » Barre/MediaWiki » Barre/MediaWiki/Extensions » Barre/Extensio…kw bread crumbs