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, this project is still not quite finished. 🚧
   
   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. 
   Wiki registration will be available soon!

Template:TutorialMeta: Difference between revisions

Template page
No edit summary
 
Changes made to align with the new hub revamp. Replaced topics with tags, removed difficulty.
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
== TutorialMeta ==
== TutorialMeta ==
Stores tutorial metadata into the Cargo database (<code>Tutorials</code> table) so it appears on the [[Tutorials]] hub under the correct topic section. Also auto-tags the page into the relevant categories. Place at the top of every tutorial page.
Stores tutorial metadata into the Cargo database ('''Tutorials''' table) so it
appears on the [[Tutorials]] hub. Place at the top of every tutorial page.


=== Usage ===
=== Usage ===
Line 7: Line 8:
{{TutorialMeta
{{TutorialMeta
| name        = How to Record Field Audio on a Budget
| name        = How to Record Field Audio on a Budget
| topic      = Audio
| difficulty  = Beginner
| description = A short description shown on the hub card (1–2 sentences).
| description = A short description shown on the hub card (1–2 sentences).
| tags        = audio recording field budget beginner
| tags        = audio, recording, beginner, field-recording
| image      = MyThumbnailImage.png
| image      = MyThumbnailImage.png
}}
}}
Line 16: Line 15:


=== Parameters ===
=== Parameters ===
; <code>name</code> : Tutorial display name shown on the hub card. Defaults to the page name.
; <code>name</code> : Tutorial display name. Defaults to the page name.
; <code>topic</code> : One or more topics, comma-separated (e.g. <code>Audio</code> or <code>Audio, Software</code>). The tutorial appears under all listed topic sections. Valid values: Audio, Digital Arts, Games, Handicrafts, Photography, Software, Video, Writing, World Building.
; <code>difficulty</code> : Difficulty level shown as a coloured badge. Values: <code>Beginner</code>, <code>Intermediate</code>, <code>Advanced</code>. Defaults to Beginner.
; <code>description</code> : Short description shown on the tutorial card hover. Keep to 1–2 sentences.
; <code>description</code> : Short description shown on the tutorial card hover. Keep to 1–2 sentences.
; <code>tags</code> : Space-separated keywords used for filtering within tutorial sections.
; <code>tags</code> : Comma-separated tags for filtering and searching. Include topic tags (e.g. <code>audio</code>, <code>software</code>) and difficulty tags (e.g. <code>beginner</code>, <code>intermediate</code>, <code>advanced</code>).
; <code>image</code> : Cover image filename only — no <code>File:</code> prefix (e.g. <code>MyThumbnail.png</code>). Upload via [[Special:Upload]] first.
; <code>image</code> : Cover image filename without <code>File:</code> prefix. Upload via [[Special:Upload]] first.


=== Notes ===
=== Notes ===
* The page is automatically tagged into <code><nowiki>[[Category:Tutorials]]</nowiki></code> and <code><nowiki>[[Category:Tutorials/Audio]]</nowiki></code> etc. via <code>#arraymap</code> (requires [[Extension:Arrays]]).
* Difficulty is now handled via tags — add <code>beginner</code>, <code>intermediate</code>, or <code>advanced</code> to the tags field.
* After saving, the tutorial appears on the hub within seconds (Cargo job queue).
* After saving, the tutorial appears on the hub within seconds (Cargo job queue).
* A hidden <code>div.tutorial-meta-data</code> is added to the page for legacy JS compatibility. It has <code>display:none</code> and is not visible.
 
<templatedata>
{
    "description": "Registers a tutorial in the Cargo database so it appears on the Tutorials hub. Place at the top of every tutorial page.",
    "params": {
        "name": {
            "label": "Tutorial name",
            "description": "Display name. Defaults to the page name.",
            "type": "string",
            "default": "{{PAGENAME}}",
            "required": false
        },
        "description": {
            "label": "Description",
            "description": "Short description shown on the tutorial card hover.",
            "type": "content",
            "required": false
        },
        "tags": {
            "label": "Tags",
            "description": "Comma-separated tags. Include topic and difficulty tags (e.g. audio, beginner, synthesis).",
            "type": "string",
            "required": false
        },
        "image": {
            "label": "Cover image",
            "description": "Cover image filename without File: prefix.",
            "type": "wiki-file-name",
            "required": false
        }
    },
    "format": "block"
}
</templatedata>


{{#cargo_declare:
{{#cargo_declare:
   _table      = Tutorials
   _table      = Tutorials
| name        = String
| name        = String
| topics      = List (,) of String
| difficulty  = String
| description = Text
| description = Text
| image      = File
| image      = File
Line 40: Line 68:
[[Category:Cargo Templates]]
[[Category:Cargo Templates]]
[[Category:Layout Templates]]
[[Category:Layout Templates]]
</noinclude><div class="tutorial-meta-data" data-name="{{{name|{{PAGENAME}}}}}" data-link="{{FULLPAGENAME}}" data-topic="{{{topic|}}}" data-difficulty="{{{difficulty|Beginner}}}" data-description="{{{description|}}}" data-tags="{{{tags|}}}" data-image="{{{image|}}}" style="display:none;"></div><includeonly>{{#cargo_store:
</noinclude><includeonly>{{#cargo_store:
   _table      = Tutorials
   _table      = Tutorials
| name        = {{{name|{{PAGENAME}}}}}
| name        = {{{name|{{PAGENAME}}}}}
| topics      = {{{topic|}}}
| difficulty  = {{{difficulty|Beginner}}}
| description = {{{description|}}}
| description = {{{description|}}}
| image      = {{{image|}}}
| image      = {{{image|}}}
| tags        = {{{tags|}}}
| tags        = {{{tags|}}}
}}[[Category:Tutorials]]{{#arraymap:{{{topic|}}}|,|@@|[[Category:Tutorials/@@]]| }}</includeonly>
}}[[Category:Tutorials]]</includeonly>

Latest revision as of 00:16, 2 April 2026

TutorialMeta

Stores tutorial metadata into the Cargo database (Tutorials table) so it appears on the Tutorials hub. Place at the top of every tutorial page.

Usage

{{TutorialMeta
| name        = How to Record Field Audio on a Budget
| description = A short description shown on the hub card (1–2 sentences).
| tags        = audio, recording, beginner, field-recording
| image       = MyThumbnailImage.png
}}

Parameters

name
Tutorial display name. Defaults to the page name.
description
Short description shown on the tutorial card hover. Keep to 1–2 sentences.
tags
Comma-separated tags for filtering and searching. Include topic tags (e.g. audio, software) and difficulty tags (e.g. beginner, intermediate, advanced).
image
Cover image filename without File: prefix. Upload via Special:Upload first.

Notes

  • Difficulty is now handled via tags — add beginner, intermediate, or advanced to the tags field.
  • After saving, the tutorial appears on the hub within seconds (Cargo job queue).

Registers a tutorial in the Cargo database so it appears on the Tutorials hub. Place at the top of every tutorial page.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Tutorial namename

Display name. Defaults to the page name.

Default
{{PAGENAME}}
Stringoptional
Descriptiondescription

Short description shown on the tutorial card hover.

Contentoptional
Tagstags

Comma-separated tags. Include topic and difficulty tags (e.g. audio, beginner, synthesis).

Stringoptional
Cover imageimage

Cover image filename without File: prefix.

Fileoptional

This template defines the table "Tutorials". View table.

Contents