Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Xpdoc/doc: Difference between revisions

Template page
mNo edit summary
mNo edit summary
Line 9: Line 9:
|2stat=optional
|2stat=optional
|3=gives
|3=gives
|3d=text (or the empty string) to replace the word "gives", e.g. gives=<nowiki>{{!}}{{!}}</nowiki> to produce "<nowiki>||</nowiki>", for use in a table
|3d=text (or the empty string) to replace the arrow, e.g. gives=<nowiki>{{!}}{{!}}</nowiki> to produce "<nowiki>||</nowiki>", for use in a table
|3def=gives
|3def=gives
|3stat=optional
|3stat=optional
Line 18: Line 18:
*its rendering
*its rendering
without the need of repeating the parameters in the wikitext.
without the need of repeating the parameters in the wikitext.
Naming scheme:
*o = double opening braces
*c = double closing braces
This template combines the functionality of templates listed in [[m:Help:Expansion demo templates]] with a single o and c (no nesting), but with some restrictions.
|namespace=10
|namespace=10
|usergroup=all
|usergroup=all
|placement=
|placement=
|usage-notes=In the case of demonstrating a template, values of unnamed parameters of this template are trimmed, so [[Template:Xpdoc]] cannot be used for demonstrating the effect of spaces at the start or end of an unnamed parameter.
|usage-notes=
|type=
|type=
|example=Creator:Vincent van Gogh
|example=Creator:Vincent van Gogh
|i18n-method=
|i18n-method=
|i18n-desc=
|i18n-desc=
|seealso=[[m:Help:Expansion demo templates]]
|seealso=
|setscats=
|setscats=
|lines=
|lines=
Line 40: Line 33:
}}
}}


==More examples==
==Notes==
{{sed|1}}
{{sed|1}}Naming scheme:
*o = double opening braces
*c = double closing braces
 
This template combines the functionality of templates listed in [[m:Help:Expansion demo templates]] with a single o and c (no nesting), but with some restrictions.
 
In the case of demonstrating a template, values of unnamed parameters of this template are trimmed, so [[Template:Xpdoc]] cannot be used for demonstrating the effect of spaces at the start or end of an unnamed parameter.


<code><nowiki>{{xpdoc|ISOdate|2009-04-03}}</nowiki></code> produces: "{{xpdoc|ISOdate|2009-04-03}}".
==Examples==
{{sed|2}}<code><nowiki>{{xpdoc|ISOdate|2009-04-03}}</nowiki></code> produces: "{{xpdoc|ISOdate|2009-04-03}}".


==See also==
{{sed|3}}
*[[m:Help:Expansion demo templates]]
<includeonly>[[Category:Expansion demo templates]]</includeonly>
<includeonly>[[Category:Expansion demo templates]]</includeonly>

Revision as of 06:43, 20 September 2010

The expansion demo templates show, for documentation:

  • some wikitext
  • its rendering

without the need of repeating the parameters in the wikitext.

Usage

{{xpdoc |1= |2= |gives= }}

Template parameters

ParameterDescriptionDefaultStatus
1name of parser function, a colon, and the first parameter, or name of templateemptyrequired
2the parameter after the first pipeemptyoptional
givestext (or the empty string) to replace the arrow, e.g. gives={{!}}{{!}} to produce "||", for use in a tablegivesoptional

Additional information

The template is intended to be used in the following namespaces: the Template namespace

The template is intended to be used by the following user groups: all users

Example

{{xpdoc|Creator:Vincent van Gogh}}

renders as:

{{Creator:Vincent van Gogh}}Template:Creator:Vincent van Gogh

Notes

edit

Naming scheme:

  • o = double opening braces
  • c = double closing braces

This template combines the functionality of templates listed in m:Help:Expansion demo templates with a single o and c (no nesting), but with some restrictions.

In the case of demonstrating a template, values of unnamed parameters of this template are trimmed, so Template:Xpdoc cannot be used for demonstrating the effect of spaces at the start or end of an unnamed parameter.

Examples

edit

{{xpdoc|ISOdate|2009-04-03}} produces: "{{ISOdate|2009-04-03}} → 3 April 2009".

See also

edit

Cookies help us deliver our services. By using our services, you agree to our use of cookies.