Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Fishtank Live Wiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:Documentation (copy)/doc
Template
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{#ifexist: Template:Documentation/preload | <!-- nothing; preload already copied --> | :<strong class="error">Please copy <nowiki>{{Documentation}}</nowiki>'s preload template from [[w:c:templates:Template:Documentation/preload]] to [[Template:Documentation/preload]]!</strong>}}<!-- -->{{#ifexist: Template:T | <!-- nothing; T already copied/exists --> | :<strong class="error">Please copy <nowiki>{{T}}</nowiki> from [[w:c:templates:Template:T]] to [[Template:T]]!</strong>}}<!-- -->{{#ifexist: Template:T/doc | <!-- nothing; T's documentation already copied/exists --> | :<strong class="error">Please copy <nowiki>{{T}}</nowiki>'s documentation from [[w:c:templates:Template:T/doc]] to [[Template:T/doc]]!</strong>}} <!-- you can remove this line and everything above it if you don't see any big bold red text --> == Description == : '''Note: This template requires the [[mw:Extension:Variables|variables extension]]. See [[w:Help:Extensions#Available_on_request|Help:Extensions]] on Community Central for information on how to request this.''' This template is used to insert [[w:Help:Templates|template information]], its [[w:Help:Template parameters|parameters]], and other information on a template page. More information may be found at [[w:Help:Template documentation|Help:Template documentation]] on Community Central. ==Syntax== Add <code><nowiki><noinclude></nowiki>{{t|Documentation}}<nowiki></noinclude></nowiki></code> at the end of the template page. Add <code><nowiki><noinclude></nowiki>{{t|Documentation|<documentation page>}}<nowiki></noinclude></nowiki></code> to transclude an alternative page from the /doc subpage. To add documentation inline, meaning on the main template page itself, add <code><nowiki><noinclude></nowiki>{{t|Documentation|2=content=custom inline content}}<nowiki></noinclude></nowiki></code> For full syntax, see [[#Advanced syntax]]. ==Basic usage== ===On the Template page=== This is the normal format when used: <pre> TEMPLATE CODE <includeonly>Any categories to be inserted into articles by the template</includeonly> <noinclude>{{Documentation}}</noinclude> </pre> Some notes: * If your template is not a completed div or table, you may need to close the tags just before <code><nowiki>{{Documentation}}</nowiki></code> is inserted (within the noinclude tags). * A line break right before <code><nowiki>{{Documentation}}</nowiki></code> can also be useful as it helps prevent the documentation template "running into" previous code. * If for some reason you need to transclude a different page other than the documentation page (e.g. when using a group of templates with same documentation), you can use the <code>|1=</code> parameter (see [[#Syntax|Syntax]]). * If the template documentation is rather short, you can specify documentation inline with the text, by using the <code>|content=</code> parameter (see [[#Syntax|Syntax]] again). ===On the documentation page=== The documentation page is usually located on the /doc subpage for a template, but a different page can be specified with the first parameter of the template (see [[#Syntax|Syntax]]). Normally, you will want to write something like the following on the documentation page: <pre> == Description == This template is used to do something. == Syntax == Type <code>{{t|templatename|param1}}</code> somewhere. === Parameters === ;<code>param1</code> : This parameter is used to add something. === TemplateData === <templatedata>{}</templatedata> == Examples == <code><nowiki>{{templatename|input}}</nowiki></code> results in... {{templatename|input}} <includeonly>Any categories for the template itself</includeonly> <noinclude>[[Category:Template documentation]]</noinclude> </pre> Use any or all of the above description/syntax/sample output sections. You may also want to add "see also" or other sections. == Advanced syntax == <templatedata> { "params": { "1": { "label": "Custom page to transclude", "description": "A custom page to transclude, usually another documentation page", "type": "wiki-page-name" }, "page": { "label": "Demo page", "description": "For testing purposes", "type": "wiki-page-name" }, "demospace": { "label": "Demo namespace", "description": "For testing purposes; changes the internal namespace of the template", "type": "string" }, "preload": { "label": "Custom documentation preload", "description": "Custom documentation preload that will be used for the [create] links for the /doc subpage", "type": "wiki-page-name" }, "preload-sandbox": { "label": "Custom preload page for /sandbox subpage", "type": "wiki-page-name" }, "preload-testcases": { "label": "Custom preload page for /testcases subpage", "type": "wiki-page-name" }, "sandbox": { "label": "Custom /sandbox subpage", "description": "Page that is used for the /sandbox link", "type": "wiki-page-name" }, "testcases": { "label": "Custom /testcases page", "description": "Page that is used for the /testcases link", "type": "wiki-page-name" }, "heading": { "label": "Custom heading text", "type": "string" }, "content": { "label": "Custom content", "description": "Custom inline content to add in the template. When this is added, the template does not transclude 1= or the /doc subpage", "type": "string" }, "nofooter": { "label": "Disable footer", "description": "Disables the footer or \"link box\" located below the documentation content.", "type": "boolean" } }, "description": "This template is used to insert a description of a template.", "paramOrder": [ "1", "content", "page", "demospace", "preload", "preload-sandbox", "preload-testcases", "sandbox", "testcases", "heading", "nofooter" ], "format": "block" } </templatedata> == Dependencies == ; Templates : [[Template:Documentation/preload]] : [[Template:Documentation/preload-sandbox]] : [[Template:Documentation/preload-testcases]] ; Images : [[:File:Documentation_icon.svg]] : [[:File:No_Documentation_icon.svg]] <includeonly>[[Category:Documentation templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
Summary:
Please note that all contributions to Fishtank Live Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Fishtank Live Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:T
(
edit
)
Toggle limited content width