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: Difference between revisions

Template page
mNo edit summary
m Reverted edits by 法人徐环 (talk) to last revision by Fatimazahrae880
 
(15 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<code><nowiki>{{</nowiki>{{{1}}}{{!}}{{{2|}}}}}</code> {{{gives|gives}}} {{{{{1}}}|{{{2|}}}}}<noinclude>{{documentation}}</noinclude>
<code><nowiki>{{</nowiki>{{{1}}}<!-- 
-->{{#if:{{{2|}}}|{{!}}{{{2|}}}}}<!-- 
-->{{#if:{{{3|}}}|{{!}}{{{3|}}}}}<!-- 
-->{{#if:{{{4|}}}|{{!}}{{{4|}}}}}<!-- 
-->{{#if:{{{5|}}}|{{!}}{{{5|}}}}}<!-- 
-->{{#if:{{{6|}}}|{{!}}{{{6|}}}}}<!-- 
-->{{#if:{{{n1
 
|}}}|{{!}}{{{n1|}}}={{{v1|}}}}}<!-- 
-->{{#if:{{{n2|}}}|{{!}}{{{n2|}}}={{{v2|}}}}}<!-- 
-->{{#if:{{{n3|}}}|{{!}}{{{n3|}}}={{{v3|}}}}}<!-- 
-->{{#if:{{{n4|}}}|{{!}}{{{n4|}}}={{{v4|}}}}}<!-- 
-->{{#if:{{{n5|}}}|{{!}}{{{n5|}}}={{{v5|}}}}}<!-- 
-->{{#if:{{{n6|}}}|{{!}}{{{n6|}}}={{{v6|}}}}}<!-- 
-->}}</code> {{{gives|}}} {{{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|<!-- 
-->{{#if:{{{n1|}}}|{{!}}{{{n1|}}}={{{v1|}}}}}<!-- 
-->{{#if:{{{n2|}}}|{{!}}{{{n2|}}}={{{v2|}}}}}<!-- 
-->{{#if:{{{n3|}}}|{{!}}{{{n3|}}}={{{v3|}}}}}<!-- 
-->{{#if:{{{n4|}}}|{{!}}{{{n4|}}}={{{v4|}}}}}<!-- 
-->{{#if:{{{n5|}}}|{{!}}{{{n5|}}}={{{v5|}}}}}<!-- 
-->{{#if:{{{n6|}}}|{{!}}{{{n6|}}}={{{v6|}}}}}<!--
-->}}<noinclude>
 
{{documentation}}
 
</noinclude>

Latest revision as of 20:04, 22 June 2018

{{{{{1}}}}} → {{{{{1}}}||||||}}

Template documentation[ view · edit · history · purge ]
This documentation is transcluded from Template:Xpdoc/doc.

The expansion demo templates show, for documentation:

  • some wikitext
  • its rendering

without the need of repeating the parameters in the wikitext.

Usage

{{xpdoc |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1name of parser function, a colon, and the first parameter, or name of templateemptyrequired
2the parameter after the first pipeemptyoptional
3the parameter after the second pipeemptyoptional
4the parameter after the third pipeemptyoptional
5the parameter after the fourth pipeemptyoptional
6the parameter after the fifth pipeemptyoptional
n1
. . . .
n6
name of the first named parameter
...
name of the sixth named parameter
emptyoptional
v1
. . . .
v6
value of the first named parameter
...
value of the sixth named parameter
emptyoptional
givestext (or the empty string) to replace the arrow, e.g. gives={{!}}{{!}} to produce "||", for use in a tableoptional

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|cc-by-4.0}}

renders as:

{{cc-by-4.0}}
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

Localization

This template is not intended to be localized.

Notes

edit

Naming scheme:
  • o = double opening braces
  • c = double closing braces

This template combines the functionality of templates listed in the Expansion demo templates on Commons 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

{{ Tle }} Meta template to describe template parametrizings


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