Module:Breadcrumb/doc: Difference between revisions

From The Seven Sages of Rome
No edit summary
No edit summary
 
Line 44: Line 44:


=== Notes ===
=== Notes ===
* The `CategoryLink` parameter should not include square brackets.
* The '''CategoryLink''' parameter should not include square brackets.
* The breadcrumb styling relies on Bootstrap 4.
* The breadcrumb styling relies on Bootstrap 4.
* The home link is hardcoded to `/Main Page`.
* The home link is hardcoded to `/Main Page`.


This module improves navigation usability, especially in structured content like Semantic MediaWiki categories.
This module improves navigation usability, especially in structured content like Semantic MediaWiki categories.

Latest revision as of 14:07, 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.