Habbo Wiki
(Updating.)
Tag: sourceedit
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
  +
<div style="border:1px solid #000000; border-radius:10px; margin:1em; margin-top:3em;"><div style="border-bottom:1px solid #000000; border-top-left-radius:10px; border-top-right-radius:10px; background:#ddd; color:#111; padding:0.5em 0.5em 1.5em 0.5em; margin:0em;">'''Template documentation''' <span style="font-size:85%;">(for the above template, sometimes hidden or invisible)</span><span class="mw-editsection plainlinks" id="doc_editlinks" style="float:right; font-size:85%;">{{
<includeonly>{{#ifeq:{{PAGENAME}}|{{BASEPAGENAME}}
 
  +
#if: {{{doc exist|yes}}}
|<!-- Template header -->
 
 
| [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=view}} view]] [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit]] [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history]] [{{purge|refresh}}]
 
  +
| <!--/doc doesn't exist-->
<div class="template-documentation" style="clear:both; margin:1em 0 0 0; padding:5px 15px 5px 15px; border:1px solid #aaa; background-color:#fafafa; color:black">
 
  +
[[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}| action=edit&preload={{
 
  +
#if: {{{preload|}}}
<div style="padding-bottom:1px; border-bottom:1px solid #aaa; margin-bottom:1px">
 
  +
| {{urlencode:{{{preload}}}}}
<span class="editsection plainlinks" id="doc_editlinks"><small>[[{{fullurl:{{FULLPAGENAME}}/doc|action=edit}} edit]] [[{{fullurl:{{FULLPAGENAME}}/doc|action=history}} history]] [[{{fullurl:{{FULLPAGENAME}}|action=purge}} purge]]</small></span>
 
  +
| {{#ifeq: {{SUBJECTSPACE}} | {{ns:File}}
<span style="font-weight:bold; font-size:125%">[[File:Information icon.png|20px|Documentation]] Template documentation</span>
 
  +
| Template:Documentation/preload-filespace
</div><span style="font-size:85%">This [[wikipedia:Wikipedia:Template documentation|documentation]] is [[wikipedia:Wikipedia:Transclusion|transcluded]] from [{{fullurl:{{FULLPAGENAME}}/doc}} {{FULLPAGENAME}}/doc].</span><br />
 
  +
| Template:Documentation/preload
 
  +
}} }} }} create]]
<div style="clear:both; margin-bottom:25px"></div><!-- The main DIV tag is intentionally left unclosed - for obvious reasons -->
 
  +
}}</span></div><div style="padding:1em; padding-bottom:0em; margin:0em;">{{ #if: {{{notoc|}}} | {{notoc}} | {{tocright}} }}
 
  +
{{{{PAGENAME}}/doc}}
|<!-- Subpage header -->
 
  +
</div><br style="clear:both;"/><div style="border-top:1px solid #000000; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; background:#ddd; color:#111; padding:0.5em; margin:0em; font-size:85%; text-align:right;">The above [[Project:Template documentation|Template documentation]] is [[m:Transclusion|transcluded]] from [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}}} {{FULLPAGENAME}}/doc]. <small style="font-style: normal">([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit] &#124; [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history])</small><br />Editors can experiment in this template’s {{
<table class="messagebox"><tr>
 
  +
#ifexist: {{{sandbox| {{FULLPAGENAME}}/sandbox }}}
<td>[[File:Information icon.svg|50px|Documentation]]</td>
 
  +
| [[{{{sandbox| {{FULLPAGENAME}}/sandbox }}}|sandbox]] <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit }} edit] {{!}} [{{fullurl:Special:ComparePages | page1={{#if:{{{1|}}}|{{case preserving encode|{{{1|}}}}}|{{NAMESPACEE}}:{{BASEPAGENAMEE}}}}&page2={{NAMESPACEE}}:{{BASEPAGENAMEE}}/sandbox}} diff])</small>
<td>'''This is a [[wikipedia:Wikipedia:Template documentation|documentation]] [[wikipedia:Wikipedia:Subpages|subpage]] for [[{{#titleparts:{{FULLPAGENAME}}|1}}]]''' <span style="font-size:85%">(see that page for the template itself)</span>.<br />It contains usage information, [[wikipedia:Wikipedia:Categorization|categories]] and other content that is not part of the original template page.</td>
 
  +
| sandbox <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload=Template:Documentation/preload-sandbox }} create])</small>
</tr></table>[[Category:Template documentation|{{BASEPAGENAME}}]]
 
  +
}} and {{
}}__NOEDITSECTION__</includeonly><noinclude>{{/doc}}</noinclude>
 
  +
#ifexist: {{{testcases| {{FULLPAGENAME}}/testcases }}}
  +
| [[{{{testcases| {{FULLPAGENAME}}/testcases }}}|testcases]] <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit }} edit])</small>
  +
| testcases <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit&preload=Template:Documentation/preload-testcases }} create])</small>
  +
}} pages<br />Please add categories and interwikis to the [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}}} /doc] subpage.<br />[[Special:PrefixIndex/{{{template page|{{FULLPAGENAME}}}}}/|Subpages of this template]]</div></div>

Latest revision as of 05:38, 16 September 2015

Template documentation (for the above template, sometimes hidden or invisible)[view] [edit] [history] [refresh]

Description

Template:Documentation is used to insert descriptions on template pages.

Syntax

<noinclude>{{documentation}}</noinclude>

at the end of the template page.

General usage

On the Template page

Template code<includeonly>Any categories to be inserted into articles by the template</includeonly><noinclude>
{{documentation}}</noinclude>

Information icon4.svg Note: Depending on the template, you may need to insert the {{clr}} template (or complete a table/div) just before inserting <noinclude>{{documentation}}</noinclude>.

The line break is also useful as it helps prevent the documentation template "running into" previous code.

On the Template/doc page

<noinclude>{{documentation subpage}}</noinclude>
=== Description ===

'''{{FULLPAGENAME}}''' is used to do something.

=== Syntax ===

 {{tlx|templatename}}

=== Parameters ===

;{{para|foo}} : purpose of foo

=== Examples ===

 {{tlx|templatename}}

;produces…

{{templatename}}


{{tlx|templatename|<var>foo</var>}}

;produces …

{{templatename|foo}}

=== See also ===


<includeonly>
Any categories for the template itself
</includeonly>

Use any or all of the above description/syntax/sample output sections. You may also want to add “see also” or further usage information sections.

Information icon4.svg Note: The above example also uses Template:Tlx.


The above Template documentation is transcluded from Template:Documentation/doc. (edit | history)
Editors can experiment in this template’s sandbox (create) and testcases (create) pages
Please add categories and interwikis to the /doc subpage.
Subpages of this template