Difference between revisions of "Template:Extension"

From WPRDC Wiki
Jump to navigation Jump to search
>Shirayuki
m (Undid revision 3509966 by Wladek92 (talk): other is not defined in Module:Extension)
>Wladek92
(adding < translate > sections)
Line 792: Line 792:
<!--T:93-->
<!--T:93-->
To improve the create extension button behavior:
To improve the create extension button behavior:
</translate>
 
* '''[[Template:Extension/Sample]]:''' The boilerplate extension that is preloaded into newly-created pages.
* '''<tvar|extsample>[[Template:Extension/Sample]]</>:''' The boilerplate extension that is preloaded into newly-created pages.
* '''[[Template:Extension/CreateExtensionInputBox]]:''' An input box that can be inserted wherever you want users to easily create extensions. For documentation on the <code><nowiki><inputbox></nowiki></code> tag, please see [[Extension:InputBox]].
* '''<tvar|extinpbox>[[Template:Extension/CreateExtensionInputBox]]</>:''' An input box that can be inserted wherever you want users to easily create extensions. For documentation on the <tvar|tagvalue><code><nowiki><inputbox></nowiki></code></> tag, please see <tvar|url>{{ll|Extension:InputBox|Extension:InputBox}}</>.


=== Infobox parameters ===
=== Infobox parameters ===
In general:
In general:
* To make this template easy to use, each label in the infobox is linked to documentation on the template parameter(s) it displays. If you add a parameter, please be sure to also add it to the [[Template:Extension#Content parameters|content parameter documentation]] and link its label to that documentation.
 
* To make this template easy to use, each label in the infobox is linked to documentation on the template parameter(s) it displays. If you add a parameter, please be sure to also add it to the {{ll|<tvar|anchor>Template:Extension#Content parameters</>|content parameter documentation}} and link its label to that documentation.


To change/correct/add to the implementation type parameters:
To change/correct/add to the implementation type parameters:
* Check the [[Template_talk:Extension|talk page]] - there have been some extensive discussions about this field.
* Check the [[<tvar|url>Template_talk:Extension</>|talk page]] - there have been some extensive discussions about this field.
* '''[[Template:Extension/TypeSwitch]]:''' Stores the possible values for the type field. Multiple values are implemented by calling this template with [[Template:Foreach]].
* '''<tvar|typeswitch>{{ll|Template:Extension/TypeSwitch|Template:Extension/TypeSwitch}}</>:''' Stores the possible values for the type field. Multiple values are implemented by calling this template with <tvar|foreach>[[Template:Foreach]]</>.
* '''[[Template:Extension/TypeSwitchNoCats]]:''' Does not need to be modified when adding a new type. Used instead of [[Template:Extension/TypeSwitch]] when this template is used in <code>templatemode=nocats</code>. Templates used with [[Template:Foreach]] can only take one parameter so we need to wrap the call to [[Template:Extension/TypeSwitch]] with another template that sets the mode.
* '''<tvar|typeswitchnocats>{{ll|Template:Extension/TypeSwitchNoCats|Template:Extension/TypeSwitchNoCats}}</>:''' Does not need to be modified when adding a new type. Used instead of <tvar|typeswitch>{{ll|Template:Extension/TypeSwitch|Template:Extension/TypeSwitch}}</> when this template is used in <tvar|nocats><code>templatemode=nocats</code></>. Templates used with <tvar|foreach>[[Template:Foreach]]</> can only take one parameter so we need to wrap the call to <tvar|tpeswitch>{{ll|Template:Extension/TypeSwitch|Template:Extension/TypeSwitch}}</> with another template that sets the mode.


To change the behavior of the hook parameters:
To change the behavior of the hook parameters:
* '''[[Template:Extension/HookInUse]]:''' Adds links and categories for a hook in use. Multiple hooks in use are implemented by calling this template with [[Template:Foreach]].
 
* '''[[Template:Extension/HookInUseNoCats]]:''' Used instead of [[Template:Extension/HookInUse]] when this template is used in <code>templatemode=nocats</code>. Templates used with [[Template:Foreach]] can only take one parameter so we need to wrap the call to [[Template:Extension/HookInUse]] with another template that sets the mode.
* '''<tvar|hookinuse>[[Template:Extension/HookInUse]]</>:''' Adds links and categories for a hook in use. Multiple hooks in use are implemented by calling this template with <tvar|foreach>[[Template:Foreach]]</>.
* '''<tvar|hookinusenocats>[[Template:Extension/HookInUseNoCats]]</>:''' Used instead of <tvar|hookinuse>[[Template:Extension/HookInUse]]</> when this template is used in <tvar|nocats><code>templatemode=nocats</code></>. Templates used with <tvar|feach>[[Template:Foreach]]</> can only take one parameter so we need to wrap the call to <tvar|hookuse>[[Template:Extension/HookInUse]]</> with another template that sets the mode.


== Test case ==
== Test case ==
See if the following pages are still ok, after edited this template.
 
See if the following pages are still ok, after edited this template.</translate>
* [[Extension:Description2]]
* [[Extension:Description2]]
* [[Template:Extension]]
* [[Template:Extension]]

Revision as of 20:45, 17 November 2019

<languages/> Lua error in Module:TNT at line 158: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Documentation.tab.[[Category:Template documentation pages{{#translation:}}]] Maintenance: vulnerabilities, archived

[[Category:Info templates{{#translation:}}|Extension]] [[Category:Extension creation{{#translation:}}]] [[Category:Categorizing templates{{#translation:}}|Extension]] [[Category:Extension templates{{#translation:}}]]