Difference between revisions of "Template:Infobox Template"

From Twinsuniverse
Jump to: navigation, search
m (fix of incorrect example value)
(added infobox)
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>This template is used as an infobox for Template pages. It should be the first of the page, before the general description.
+
<noinclude>{{Infobox Template
 +
|purpose=infobox
 +
|singletag=no
 +
|multiline=yes
 +
|gamerelated=no
 +
|suppressible=recursively
 +
|choice=none
 +
|cat1=Twinsuniverse - Templates
 +
|var1=infobox_messages!Infobox!active
 +
|var2=maintenance_message!Infobox!active
 +
}}
 +
 
 +
This template is used as an infobox for template pages. It should be the first of the page, before the general description.
  
 
==Parameters==
 
==Parameters==
 
* '''title''': An optional title to display at the top of the infobox (case sensitive, defaults to <nowiki>{{</nowiki>PAGENAME<nowiki>}}</nowiki>)
 
* '''title''': An optional title to display at the top of the infobox (case sensitive, defaults to <nowiki>{{</nowiki>PAGENAME<nowiki>}}</nowiki>)
 
* '''purpose''': The purpose of the template; infobox, formatting, messagebox or website (case insensitive, defaults to "unknown", see the [[/purpose]] subpage)
 
* '''purpose''': The purpose of the template; infobox, formatting, messagebox or website (case insensitive, defaults to "unknown", see the [[/purpose]] subpage)
* '''singletag''': Whether or not the template should be called without parameters; yes, optional or no (case insensitive, defaults to "unknown", see the [[/singletag]] subpage)
+
* '''singletag''': Whether or not the template should be called without parameters; yes, optional or no (case insensitive, defaults to "unspecified", see the [[/singletag]] subpage)
 +
* '''multiline''': Wthether or not the template occupies more than one line on a page; yes, optional or no (case insensitive, defaults to "unknown", see the [[/multiline]] subpage)
 
* '''gamerelated''': Whether or not the template directly relates to any of the games; yes or no (case insensitive, defaults to "unknown", see the [[/gamerelated]] subpage)
 
* '''gamerelated''': Whether or not the template directly relates to any of the games; yes or no (case insensitive, defaults to "unknown", see the [[/gamerelated]] subpage)
* '''normalcat''': The category name used for normal categorization if only one; "multiple" otherwise (case sensitive, defaults to not a categorizer)
+
* '''suppressible''': Whether or not the template allows suppression of categorization; yes, recursively or no (case insensitive, defaults to "unknown", see the [[/suppressible]] subpage)
* '''abnormalcat''': The category name used for abnormal categorization (case sensitive, defaults to not a categorizer)
+
* '''choice''': The type of choice this template offers; single, multiple or none (case insensitive, defaults to "unknown", see the [[/choice]] subpage)
* '''defaultcat''': The category name used for default categorization (case sensitive, defaults to not a categorizer)
+
* '''cat1''': The category name and value used for categorization by the template, separated by exclamation mark (allows duplicates with increasing number, see the [[/categories]] subpage)
* '''suppressible''': Whether or not the template allows suppression of categorization; yes, recursively or no (case insensitive, defaults to no, see the [[/suppressible]] subpage)
+
* '''var1''': The name of a variable that is used by the template (allows duplicates with increasing number, see the [[/variables]] subpage)
 
* '''nocat''': Whether or not to suppress categorization of the template itself under all automatically chosen categories (defaults to false, which means auto categorization).
 
* '''nocat''': Whether or not to suppress categorization of the template itself under all automatically chosen categories (defaults to false, which means auto categorization).
  
  
'''''Note''': The value of the '''Protected''' heading of this infobox is automatically set, and cannot be specified manually.''
+
'''''Note''': The value of the '''Protected''' heading of this infobox is automatically set to the protection level of the page this template is used on, and cannot be specified manually, but honours categorization suppression.''
  
 
==Syntax==
 
==Syntax==
Line 20: Line 33:
 
  |purpose=
 
  |purpose=
 
  |singletag=
 
  |singletag=
 +
|multiline=
 
  |gamerelated=
 
  |gamerelated=
  |normalcat=
+
  |suppressible=
  |abnormalcat=
+
  |choice=
  |defaultcat=
+
  |cat1=
  |suppressable=
+
  |cat2=
 +
|var1=
 
}}</nowiki>
 
}}</nowiki>
  
 
==Example==
 
==Example==
On a template page called "Infobox User/adventure":
+
This template is by default rendered on this page in the top right, because that infobox is what this template is for.
 +
But as a second example, on a template page called "Infobox User/adventure":
 
</noinclude><includeonly>{{categorizer|category=Twinsuniverse - Templates|display=emptyinfobox|nocat={{{nocat|false}}}}}</includeonly>
 
</noinclude><includeonly>{{categorizer|category=Twinsuniverse - Templates|display=emptyinfobox|nocat={{{nocat|false}}}}}</includeonly>
 
{{Infobox
 
{{Infobox
Line 45: Line 61:
 
  |data2=<includeonly>{{Infobox Template/singletag|{{{singletag|}}}|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{/singletag|no|nocat=true}}</noinclude>
 
  |data2=<includeonly>{{Infobox Template/singletag|{{{singletag|}}}|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{/singletag|no|nocat=true}}</noinclude>
  
  |label3=Protected
+
  |label3=Multi-line
  |data3=<includeonly>{{Infobox Template/protected|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{/protected|nocat=true}}</noinclude>
+
  |data3=<includeonly>{{Infobox Template/multiline|{{{multiline|}}}|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{/multiline|optional|nocat=true}}</noinclude>
  
  |label4=Game related
+
  |label4=Protected
  |data4=<includeonly>{{Infobox Template/gamerelated|{{{gamerelated|}}}|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{/gamerelated|yes|nocat=true}}</noinclude>
+
  |data4=<includeonly>{{Infobox Template/protected|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{/protected|nocat=true}}</noinclude>
  
  |header5=Categorization
+
  |label5=Game related
  |class5=subtitle
+
  |data5=<includeonly>{{Infobox Template/gamerelated|{{{gamerelated|}}}|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{/gamerelated|yes|nocat=true}}</noinclude>
  
  |label6=Normally
+
  |header6=Categorization
  |data6=<includeonly>{{categorizer|category={{#if: {{{normalcat|}}}|{{#ifeq: {{{normalcat}}}|multiple|Multi-categorizing templates|{{{normalcat}}}}}|Noncategorizing templates}}|label={{#ifeq: {{{normalcat|}}}|multiple|Multiple}}|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{categorizer|category=Multi-categorizing templates|label=Multiple|nocat=true}}</noinclude>
+
  |class6=subtitle
  
  |label7=Abnormally
+
  |label7=Suppressible
  |data7=<includeonly>{{categorizer|category={{{abnormalcat|}}}|nocat={{{nocat|false}}}}}</includeonly>
+
  |data7=<includeonly>{{Infobox Template/suppressible|{{#if:{{{cat1|}}}|{{{suppressible|}}}}}|ignore={{#if:{{{cat1|}}}||true}}|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{/suppressible|yes|nocat=true}}</noinclude>
  
  |label8=Default
+
  |label8=Choice
  |data8=<includeonly>{{categorizer|category={{{defaultcat|}}}|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{categorizer|category=Users with unknown adventure xp|nocat=true}}</noinclude>
+
  |data8=<includeonly>{{Infobox Template/choice|{{#if:{{{cat1|}}}|{{{choice|}}}}}|ignore={{#if:{{{cat1|}}}||true}}|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{/choice|multiple|nocat=true}}</noinclude>
  
  |label9=Suppressible
+
  |label9=Categories
  |data9=<includeonly>{{Infobox Template/suppressible|{{{suppressible|}}}|nocat={{{nocat|false}}}}}</includeonly><noinclude>{{/suppressible|yes|nocat=true}}</noinclude>
+
  |data9=<includeonly>{{Infobox Template/categories|nocat={{{nocat|false}}}
 +
  |{{{cat1|}}}|{{{cat2|}}}|{{{cat3|}}}|{{{cat4|}}}|{{{cat5|}}}|{{{cat6|}}}|{{{cat7|}}}|{{{cat8|}}}|{{{cat9|}}}|{{{cat10|}}}|{{{cat11|}}}|{{{cat12|}}}|{{{cat13|}}}|{{{cat14|}}}|{{{cat15|}}}|{{{cat16|}}}|{{{cat17|}}}|{{{cat18|}}}|{{{cat19|}}}|{{{cat20|}}}|{{{cat21|}}}|{{{cat22|}}}|{{{cat23|}}}|{{{cat24|}}}|{{{cat25|}}}|{{{cat26|}}}|{{{cat27|}}}|{{{cat28|}}}|{{{cat29|}}}|{{{cat30|}}}}}</includeonly><noinclude>{{/categories|LBA1 users!lba1|LBA2 users!lba2|Users with unknown adventure xp!''unknown''!maintenance|nocat=true}}</noinclude>
  
  |header10=Maintenance tasks
+
  |header10=Variables
 
  |class10=subtitle
 
  |class10=subtitle
  
  |header11=Variables
+
  |label11=Names
  |class11=subtitle
+
  |data11=<includeonly>{{Infobox Template/variables|nocat={{{nocat|false}}}
 +
  |{{{var1|}}}|{{{var2|}}}|{{{var3|}}}|{{{var4|}}}|{{{var5|}}}|{{{var6|}}}|{{{var7|}}}|{{{var8|}}}|{{{var9|}}}|{{{var10|}}}}}</includeonly><noinclude>{{/variables|lba|nocat=true}}</noinclude>
  
 
  |header12=Subpages
 
  |header12=Subpages
Line 78: Line 96:
 
  |purpose=infobox
 
  |purpose=infobox
 
  |singletag=no
 
  |singletag=no
 +
|multiline=optional
 
  |gamerelated=yes
 
  |gamerelated=yes
  |normalcat=multiple
+
  |suppressible=yes
  |abnormalcat=
+
|choice=multiple
  |defaultcat=Users with unknown adventure xp
+
  |cat1=LBA1 users!lba1
  |suppressable=yes
+
  |cat2=LBA2 users!lba2
 +
|cat3=Multiple adventure users!''multiple''
 +
|cat4=Users with unknown adventure xp!''unknown''!maintenance
 +
  |var1=lba
 
}}</nowiki>
 
}}</nowiki>
  
 
''example paragraph: ''Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP.
 
''example paragraph: ''Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP.
  
[[Category:Infoboxes|Template]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 23:27, 4 June 2014

Infobox Template
Purpose

Infobox [list all]

Single tag

No [list all]

Multi-line

Yes [list all]

Protected

No [list all]

Game related

No [list all]

Categorization
Suppressible

Recursively [list all]

Choice

No choice [list all]

Categories

One: [list all]

Variables
Names

Multiple: [list all]

  • infobox_messages [template] (active)
  • maintenance_message [template] (active)
Subpages

This template is used as an infobox for template pages. It should be the first of the page, before the general description.

Parameters

  • title: An optional title to display at the top of the infobox (case sensitive, defaults to {{PAGENAME}})
  • purpose: The purpose of the template; infobox, formatting, messagebox or website (case insensitive, defaults to "unknown", see the /purpose subpage)
  • singletag: Whether or not the template should be called without parameters; yes, optional or no (case insensitive, defaults to "unspecified", see the /singletag subpage)
  • multiline: Wthether or not the template occupies more than one line on a page; yes, optional or no (case insensitive, defaults to "unknown", see the /multiline subpage)
  • gamerelated: Whether or not the template directly relates to any of the games; yes or no (case insensitive, defaults to "unknown", see the /gamerelated subpage)
  • suppressible: Whether or not the template allows suppression of categorization; yes, recursively or no (case insensitive, defaults to "unknown", see the /suppressible subpage)
  • choice: The type of choice this template offers; single, multiple or none (case insensitive, defaults to "unknown", see the /choice subpage)
  • cat1: The category name and value used for categorization by the template, separated by exclamation mark (allows duplicates with increasing number, see the /categories subpage)
  • var1: The name of a variable that is used by the template (allows duplicates with increasing number, see the /variables subpage)
  • nocat: Whether or not to suppress categorization of the template itself under all automatically chosen categories (defaults to false, which means auto categorization).


Note: The value of the Protected heading of this infobox is automatically set to the protection level of the page this template is used on, and cannot be specified manually, but honours categorization suppression.

Syntax

Copy and paste the following for quick use:

{{Infobox Template
 |purpose=
 |singletag=
 |multiline=
 |gamerelated=
 |suppressible=
 |choice=
 |cat1=
 |cat2=
 |var1=
}}

Example

This template is by default rendered on this page in the top right, because that infobox is what this template is for.

But as a second example, on a template page called "Infobox User/adventure":
Infobox User/adventure
Purpose

Infobox [list all]

Single tag

No [list all]

Multi-line

Optional [list all]

Protected

No [list all]

Game related

Yes [list all]

Categorization
Suppressible

Yes [list all]

Choice

Multiple categories [list all]

Categories

Multiple: [list all]

Variables
Names

One: [list all]

  • lba  (free for reuse)
Subpages
{{Infobox Template
 |purpose=infobox
 |singletag=no
 |multiline=optional
 |gamerelated=yes
 |suppressible=yes
 |choice=multiple
 |cat1=LBA1 users!lba1
 |cat2=LBA2 users!lba2
 |cat3=Multiple adventure users!''multiple''
 |cat4=Users with unknown adventure xp!''unknown''!maintenance
 |var1=lba
}}

example paragraph: Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP. Description text about the template, in this case Adventure XP.