Module:Breadcrumb/doc: Difference between revisions
Created page with "== Module:Breadcrumb == This module generates a breadcrumb navigation component for MediaWiki pages. The breadcrumb provides users with a visual representation of the page's hierarchy, linking back to the main page and a relevant category before displaying the current page. === Usage === The module is intended to be used in templates or directly in wiki pages via `#invoke`. ``` {{#invoke:Breadcrumb|breadcrumb | CategoryLink=Category:Example | CategoryName=Example Ca..." |
No edit summary |
||
| Line 6: | Line 6: | ||
The module is intended to be used in templates or directly in wiki pages via `#invoke`. | The module is intended to be used in templates or directly in wiki pages via `#invoke`. | ||
<pre> | |||
{{#invoke:Breadcrumb|breadcrumb | {{#invoke:Breadcrumb|breadcrumb | ||
| CategoryLink=Category:Example | | CategoryLink=Category:Example | ||
| Line 12: | Line 12: | ||
| PAGENAME=Current Page | | PAGENAME=Current Page | ||
}} | }} | ||
</pre> | |||
=== Parameters === | === Parameters === | ||
| Line 29: | Line 29: | ||
=== Example Output === | === Example Output === | ||
If the following invocation is used: | If the following invocation is used: | ||
<pre> | |||
{{#invoke:Breadcrumb|breadcrumb | {{#invoke:Breadcrumb|breadcrumb | ||
| CategoryLink=Category:Manuscripts | | CategoryLink=Category:Manuscripts | ||
| Line 35: | Line 35: | ||
| PAGENAME=Codex ABC | | PAGENAME=Codex ABC | ||
}} | }} | ||
</pre> | |||
The output will be: | The output will be: | ||
Revision as of 09:53, 25 March 2025
Module:Breadcrumb
This module generates a breadcrumb navigation component for MediaWiki pages. The breadcrumb provides users with a visual representation of the page's hierarchy, linking back to the main page and a relevant category before displaying the current page.
Usage
The module is intended to be used in templates or directly in wiki pages via `#invoke`.
{{#invoke:Breadcrumb|breadcrumb
| CategoryLink=Category:Example
| CategoryName=Example Category
| PAGENAME=Current Page
}}
Parameters
- `CategoryLink` - The wiki link to the relevant category (without brackets, e.g., `Category:Example`).
- `CategoryName` - The display name of the category.
- `PAGENAME` - The name of the current page.
Behavior
The module generates a structured breadcrumb navigation with three levels: 1. **Home Link**: Links back to the main page, displaying a home icon. 2. **Category Link**: Displays the category as an intermediate step in the hierarchy. 3. **Current Page**: Displays the current page as non-clickable text.
It utilizes Bootstrap 4 classes for styling and includes SVG icons for a modern visual appearance.
Example Output
If the following invocation is used:
{{#invoke:Breadcrumb|breadcrumb
| CategoryLink=Category:Manuscripts
| CategoryName=Manuscripts
| PAGENAME=Codex ABC
}}
The output will be: ``` Home > Manuscripts > Codex ABC ``` (with appropriate HTML styling and icons)
Notes
- The `CategoryLink` parameter should not include square brackets.
- The breadcrumb styling relies on Bootstrap 4.
- The home link is hardcoded to `/Main Page`.
This module improves navigation usability, especially in structured content like Semantic MediaWiki categories.