User:Barre/MediaWiki/Extensions/kw bread crumbs: Difference between revisions
m (doc) |
m (examples) |
||
Line 21: | Line 21: | ||
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/Extensions]], [[User:Barre/Extensions/kw_site_map]] then this page, [[User:Barre/Extensions/kw_bread_crumbs]]. The following code: | 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/Extensions]], [[User:Barre/Extensions/kw_site_map]] then this page, [[User:Barre/Extensions/kw_bread_crumbs]]. The following code: | ||
<pre> | <pre> | ||
<kw_bread_crumbs>prefix=Trace: |small=1</kw_bread_crumbs> | <kw_bread_crumbs>prefix=Trace: |trim_prefix=User:|small=1</kw_bread_crumbs> | ||
</pre> | </pre> | ||
...would have rendered your trace like this: | ...would have rendered your trace pretty much like this: | ||
<small>Trace: [[User:Barre|Barre]] » [[User:Barre/Extensions|Barre/Extensions]] » [[User:Barre/Extensions/kw_site_map|Barre/Extensions/kw site map]] » Barre/Extensio…kw bread crumbs</small> |
Revision as of 21:17, 21 February 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 (or inside a 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/Extensions, User:Barre/Extensions/kw_site_map then this page, User:Barre/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/Extensions » Barre/Extensions/kw site map » Barre/Extensio…kw bread crumbs