Template:Breadcrumb/doc: Difference between revisions

From Stalburg Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
The '''Breadcrumb''' template is used to manually insert a breadcrumb navigation bar at the top of a subpage in the main namespace. While MediaWiki has an [[mw:Help:Subpages|automated subpage feature]] that automatically inserts navigation breadcrumbs at the top of pages, this feature is normally disabled in the main (article) namespace since forward slashes in page titles may be misinterpreted as separators for subpages. On the Xenharmonic Wiki, forward slashes frequently appear in page titles, such as [[3/2]].
{{lua|Module:Variable arguments}}
The '''Breadcrumb''' template is used to manually insert a breadcrumb navigation bar at the top of a subpage in the main namespace. While MediaWiki has an [[mw:Help:Subpages|automated subpage feature]] that automatically inserts navigation breadcrumbs at the top of pages, this feature is normally disabled in the main (article) namespace since forward slashes in page titles may be misinterpreted as separators for subpages.
 
All subpages in the article namespace are filed under [[:Category:Article subpages]].


=== Usage ===
=== Usage ===
For pages in the (article) namespace, pass in each level of the subpage as a separate unnamed parameter.
For pages in the (article) namespace, pass in each level of the subpage as a separate unnamed parameter.


For example, if a page titled <code>eiusmod tempor incididunt</code> is located within a page titled <code>adipiscing elit sed do</code>, which in turn is located in a page titled <code>dolor sit/amet/consectetur</code>, which is located in a master page titled <code>Lorem ipsum</code>, you would put, at the top of the page:
For example, if a page titled <code>eiusmod tempor incididunt</code> is located within a page titled <code>adipiscing elit sed do</code>, which in turn is located in a page titled <code>dolor sit/amet/consectetur</code>, which is located in a master page titled <code>Lorem ipsum</code>, you would put, at the top of the <code>eiusmod tempor incididunt</code> page:


<pre>{{breadcrumb|Lorem ipsum|dolor sit/amet/consectetur|adipiscing elit sed do|eiusmod tempor incididunt}}</pre>
<pre>{{breadcrumb|Lorem ipsum|dolor sit/amet/consectetur|adipiscing elit sed do}}</pre>


<span style="display: inline-block; margin: 0 0 0.5em 0;">which gives:</span>
<span style="display: inline-block; margin: 0 0 0.5em 0;">which gives:</span>


{{{{ROOTPAGENAME}}|Lorem ipsum|dolor sit/amet/consectetur|adipiscing elit sed do|eiusmod tempor incididunt}}
{{{{ROOTPAGENAME}}|Lorem ipsum|dolor sit/amet/consectetur|adipiscing elit sed do}}
<includeonly>[[Category:Functionality templates]]</includeonly>

Latest revision as of 22:24, 16 April 2025

The Breadcrumb template is used to manually insert a breadcrumb navigation bar at the top of a subpage in the main namespace. While MediaWiki has an automated subpage feature that automatically inserts navigation breadcrumbs at the top of pages, this feature is normally disabled in the main (article) namespace since forward slashes in page titles may be misinterpreted as separators for subpages.

All subpages in the article namespace are filed under Category:Article subpages.

Usage[edit source]

For pages in the (article) namespace, pass in each level of the subpage as a separate unnamed parameter.

For example, if a page titled eiusmod tempor incididunt is located within a page titled adipiscing elit sed do, which in turn is located in a page titled dolor sit/amet/consectetur, which is located in a master page titled Lorem ipsum, you would put, at the top of the eiusmod tempor incididunt page:

{{breadcrumb|Lorem ipsum|dolor sit/amet/consectetur|adipiscing elit sed do}}

which gives: