Help:Breadcrumbs
From Edge of Darkness Wiki
Contents |
Usage
The breadcrumb data is stored in a special page, MediaWiki:Breadcrumbs. To access this page, either enter "MediaWiki:Breadcrumbs" into the "search" box and click Go or copy and paste the link [[
MediaWiki:Breadcrumbs]]
into a page, then open and edit. The contents are formatted as a wikitext list, with one line per breadcrumb option:
* category name @ breadcrumb wikitext @ tab name @ site logo
Extra blanks between parameters are ignored.
Parameter | Type | Description |
---|---|---|
category name | required | For each line in the list, see if the current page is a member of the category that matches category or the namespace with the same name. |
breadcrumb wikitext | optional | Text to display in the subtitle with the page name appended |
tab name | optional | The tab (navigation) bar with the name tab name that matches category is marked as active. |
site logo | optional | Use a different site logo for this page. (Note: Use this option with care) |
The breadcrumbs are built from the data page as follows:
- The string '@@@' is stripped from the text to be replaced with '@' before output (since the '@' character is used as a delimiter)
- Pseudo-variables of the form @@VAR@@ are evaluated.
- @@USERID@@: User ID, blank if anonymous
- @@USERGROUPS@@: Comma-delimited list of groups this user belongs to
- Templates and variables in the text are expanded. You can use parser functions like #if: if installed.
- The extension scans each line to find the first match with the current page's namespace or one of the page's categories.
- The remainder of the line is evaluated to set the breadcrumb string, sidebar, and/or logo (see below)
The extension replaces the page subtitle, which is normally used for redirect messages, with a single line navigation string. Arbitrary wikitext can be used for the navigation text, though it should be kept to a simple series of links and delimiters.
- Note
- Jakob Nielsen strongly encourages web designers to use the '>' character to delimit breadcrumb levels[1].
For example, <source lang="text">
- Hook extensions @ MediaWiki.org > Extensions >
</source> Generates the following breadcrumb for this page:
MediaWiki.org > Extensions > BreadCrumbs2 |
Note that BreadCrumbs2 uses the first match with the current page's namespace or one of the page's categories. For example, if the Breadcrumbs page contains: <source lang="text">
- Navigation extensions @ MediaWiki.org > Extensions > Navigation >
- User interface extensions @ MediaWiki.org > Extensions > User interface >
</source> The breadcrumbs for this page would be MediaWiki.org > Extensions > Navigation > Extension:BreadCrumbs2 and not MediaWiki.org > Extensions > User interface > Extension:BreadCrumbs2 because the Navigation line comes first.
Sidebar
The active link in the navigation sidebar can be highlighted using the tab name parameter, if specified. This is especially useful with skins like GuMax that display the navigation bar as a row of tabs at the top of the page instead of the Discussion/Edit/History tools.
BreadCrumbs2 automatically detects and uses the dynamic sidebar generated by DynamicSkin-based skins.
- Note
- The tab name is compared to the actual text displayed in the sidebar, so it is not language-independent.
Site logo
If the site logo parameter is specified, an alternate image file is used instead of the site default. The path to this image is relative to the root of your wiki.
- Note
- Use this feature with caution so that it doesn't interfere with your site's usability. Subtle changes are good, but dramatic changes can be confusing. If your site needs significantly different look and feel between sections, consider using namespaces and namespace-specific styles and/or DynamicSkin.
|