Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
       🚧 True to our name, we’re still a work in progress. 🚧
   
       You’re welcome to explore, but account registration is currently invite-only as we finalize the setup. 
       Join our forum or follow Mastodon for updates. 
       Full Wiki launch coming soon!
   

Template:HubHeader: Difference between revisions

Template page
No edit summary
 
Add <templatedata> for Visual Editor Usage.
Line 37: Line 37:
; <code>subtitle</code> : Orange uppercase subtitle. Defaults to "Subtitle Text".
; <code>subtitle</code> : Orange uppercase subtitle. Defaults to "Subtitle Text".
; <code>description</code> : Optional body paragraph below the subtitle.
; <code>description</code> : Optional body paragraph below the subtitle.
; <code>category</code> : If provided, shows a live count badge using <code>PAGESINCATEGORY</code> for this category name (e.g. <code>Projects/Audio</code>).
; <code>category</code> : If provided, shows a live count badge using <code>PAGESINCATEGORY</code> (e.g. <code>Projects/Audio</code>).
; <code>count_label</code> : Label above the count badge. Defaults to "Projects".
; <code>count_label</code> : Label above the count badge. Defaults to "Projects".
; <code>submit_form</code> : If provided, adds an orange "+ Submit" button linking to <code>Special:FormStart/FormName</code>. Use <code>Submit_Project</code> or <code>Submit_Tutorial</code>.
; <code>submit_form</code> : If provided, adds an orange "+ Submit" button linking to <code>Special:FormStart/FormName</code>.
; <code>hub_path</code> : Path used for the "Full Index" button (<code>Special:PrefixIndex/hub_path</code>). Defaults to current page name.
; <code>hub_path</code> : Path for the "Full Index" button. Defaults to current page name.
; <code>hub_type</code> : Template name used for the "Templates" toolbar button. Defaults to "Project".
; <code>hub_type</code> : Template name for the "Templates" toolbar button. Defaults to "Project".
; <code>license</code> : Default license shown in the metadata bar. Defaults to "CC-BY-SA 4.0".
; <code>license</code> : Default license shown in the metadata bar. Defaults to "CC-BY-SA 4.0".


=== Notes ===
=== Notes ===
* "Last Submission" and "Activity" in the metadata bar are populated by JavaScript gadgets — they show "Loading..." until the gadget runs.
* "Last Submission" and "Activity" in the metadata bar are populated by JavaScript gadgets.
* The toolbar links to [[Project:Submission Guidelines]], [[Project:Licenses]], the page's talk page, and [[Project:Community]] — create these pages to avoid red links.
* The toolbar links to [[Project:Submission Guidelines]], [[Project:Licenses]], the page's talk page, and [[Project:Community]] — create these pages to avoid red links.
<templatedata>
{
    "description": "Displays the full header block for a project or tutorial hub page, including title, count badge, toolbar, and a live metadata bar.",
    "params": {
        "title": {
            "label": "Title",
            "description": "Main heading for the hub page.",
            "type": "string",
            "default": "Title Text",
            "required": false
        },
        "subtitle": {
            "label": "Subtitle",
            "description": "Orange uppercase subtitle shown below the title.",
            "type": "string",
            "default": "Subtitle Text",
            "required": false
        },
        "description": {
            "label": "Description",
            "description": "Optional body paragraph below the subtitle. Supports wikitext.",
            "type": "content",
            "required": false
        },
        "category": {
            "label": "Category",
            "description": "Category name for the live count badge (e.g. Projects/Audio).",
            "type": "string",
            "required": false
        },
        "count_label": {
            "label": "Count label",
            "description": "Label shown above the count badge.",
            "type": "string",
            "default": "Projects",
            "required": false
        },
        "submit_form": {
            "label": "Submit form",
            "description": "PageForms form name for the orange Submit button (e.g. Submit_Project or Submit_Tutorial).",
            "type": "string",
            "suggestedvalues": ["Submit_Project", "Submit_Tutorial"],
            "required": false
        },
        "hub_path": {
            "label": "Hub path",
            "description": "Path used for the Full Index toolbar button. Defaults to the current page name.",
            "type": "wiki-page-name",
            "required": false
        },
        "hub_type": {
            "label": "Hub type",
            "description": "Template name linked in the Templates toolbar button.",
            "type": "string",
            "default": "Project",
            "suggestedvalues": ["ProjectCard", "TutorialCard"],
            "required": false
        },
        "license": {
            "label": "Default license",
            "description": "Default license shown in the metadata bar.",
            "type": "string",
            "default": "CC-BY-SA 4.0",
            "required": false
        }
    },
    "format": "block"
}
</templatedata>


[[Category:Layout Templates]]
[[Category:Layout Templates]]
</noinclude>
</noinclude>

Revision as of 08:27, 23 March 2026

Title Text
Subtitle Text

HubHeader

Displays the full header block for project and tutorial hub pages. Includes a title/subtitle/description area, optional live count badge, toolbar row with a Submit button and navigation links, and a metadata bar showing default license and live activity (populated by MediaWiki:Gadget-projects.js or MediaWiki:Gadget-tutorials.js).

Usage — Projects hub

{{HubHeader
| title       = Audio Projects
| subtitle    = Music, sound design, and anything audio
| description = Any openly licensed audio project — sound FX, music, field recordings, podcasts, etc.
| category    = Projects/Audio
| count_label = Audio Projects
| submit_form = Submit_Project
| hub_path    = Projects/Audio
| hub_type    = ProjectCard
| license     = CC-BY-SA 4.0
}}

Usage — Tutorials hub

{{HubHeader
| title       = Community Tutorials
| subtitle    = Step-by-step guides written by the community
| description = Browse tutorials by topic below.
| category    = Tutorials
| count_label = Tutorials
| submit_form = Submit_Tutorial
| hub_path    = Tutorials
| hub_type    = TutorialCard
| license     = CC-BY-SA 4.0
}}

Parameters

title
Main heading. Defaults to "Title Text".
subtitle
Orange uppercase subtitle. Defaults to "Subtitle Text".
description
Optional body paragraph below the subtitle.
category
If provided, shows a live count badge using PAGESINCATEGORY (e.g. Projects/Audio).
count_label
Label above the count badge. Defaults to "Projects".
submit_form
If provided, adds an orange "+ Submit" button linking to Special:FormStart/FormName.
hub_path
Path for the "Full Index" button. Defaults to current page name.
hub_type
Template name for the "Templates" toolbar button. Defaults to "Project".
license
Default license shown in the metadata bar. Defaults to "CC-BY-SA 4.0".

Notes

Displays the full header block for a project or tutorial hub page, including title, count badge, toolbar, and a live metadata bar.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Titletitle

Main heading for the hub page.

Default
Title Text
Stringoptional
Subtitlesubtitle

Orange uppercase subtitle shown below the title.

Default
Subtitle Text
Stringoptional
Descriptiondescription

Optional body paragraph below the subtitle. Supports wikitext.

Contentoptional
Categorycategory

Category name for the live count badge (e.g. Projects/Audio).

Stringoptional
Count labelcount_label

Label shown above the count badge.

Default
Projects
Stringoptional
Submit formsubmit_form

PageForms form name for the orange Submit button (e.g. Submit_Project or Submit_Tutorial).

Suggested values
Submit_Project Submit_Tutorial
Stringoptional
Hub pathhub_path

Path used for the Full Index toolbar button. Defaults to the current page name.

Page nameoptional
Hub typehub_type

Template name linked in the Templates toolbar button.

Suggested values
ProjectCard TutorialCard
Default
Project
Stringoptional
Default licenselicense

Default license shown in the metadata bar.

Default
CC-BY-SA 4.0
Stringoptional