Module:Breadcrumb/doc: Difference between revisions

From The Seven Sages of Rome
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 difference)

Revision as of 09:41, 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`.

```

```

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: ```

```

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.