Template:Documentation subpage: Difference between revisions
Jump to navigation
Jump to search
FaeriMagic (talk | contribs) mNo edit summary |
FaeriMagic (talk | contribs) mNo edit summary |
||
Line 4: | Line 4: | ||
[[Category:Documentation subpages]] | [[Category:Documentation subpages]] | ||
</div>}}<noinclude> | </div>}}<noinclude> | ||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"label": "Base page name", | |||
"description": "If set, overrides the automatically detected base template name (used when this template fails to detect the parent template).", | |||
"type": "string", | |||
"required": false, | |||
"example": "Template:MyTemplate" | |||
} | |||
}, | |||
"description": "Used on /doc subpages to display that this is a documentation subpage of a template. If no parameter is passed, it defaults to the base name of the current page.", | |||
"paramOrder": [ | |||
"1" | |||
] | |||
} | |||
</templatedata> | |||
{{Documentation}} | {{Documentation}} | ||
Revision as of 06:31, 30 July 2025
Used on /doc subpages to display that this is a documentation subpage of a template. If no parameter is passed, it defaults to the base name of the current page.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Base page name | 1 | If set, overrides the automatically detected base template name (used when this template fails to detect the parent template).
| String | optional |
Basic usage
In most cases, the following code is sufficient on its own:
<noinclude> {{Documentation subpage}} </noinclude>
However, a parameter may need to be specified if:
- The documentation is used on a page that is not a subpage. (e.g. test pages)
- The documentation is for a non-template page. (e.g.
Module:
pages) - One or both pages use non-standard naming conventions. (e.g.
{{Documentation subpage|Template:Artist/Album}}
)
<noinclude> {{Documentation subpage|The page you want to point to}} </noinclude>
Example
Below is a working example using a subpage at Template:Documentation subpage/doc:
This is the
/doc
subpage of Template:Documentation subpage. Any changes made here will reflect on the main template page.