Template:Dynamite: Difference between revisions

From Test Wiki
Jump to navigation Jump to search
Content deleted Content added
m Reverted edits by 51.219.137.228 (talk) to last revision by Steinsplitter
 
m 1 revision imported
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{ {{#ifexist: {{#switch: {{{t}}}| yes = Template:| no = | #default = }}{{{title}}}/{{uselang}}| {{{title}}}/{{uselang}}|{{#ifexist: {{#switch: {{{t}}}| yes = Template:| no = | #default = }}{{{title}}}/en|{{{title}}}/en}}|{{{title}}} }} }}<noinclude>
{{ {{#ifexist:{{#switch:{{{t|}}}|yes=Template:|#default =}}{{{title}}}/{{Zh other|zh|{{Int:Lang}}}}
| {{{title}}}/{{Zh other|zh|{{Int:Lang}}}}
{{doc}}
| {{#ifexist:{{#switch:{{{t|}}}|yes=Template:|#default= }}{{{title}}}/en
</noinclude>
|{{{title}}}/en
|{{{title}}}
}}
}} }}<noinclude>{{Documentation}}</noinclude>

Latest revision as of 10:31, 6 February 2026

{{ {{{title}}} }}

Template documentation

<templatedata> { "description": "This template will return a translatable page in the user's interface language if such a page exists; else, it'll return the \"/en\" page. If \"/en\" page also doesn't exist, this will return the source page of the target template.", "params": { "title": { "label": "title", "description": "Title of the page to transclude, as in a template transclusion (prefixed with namespace except for the template namespace, \":\" prefix for mainspace pages)", "example": ":VisualEditor/Newsletter/header", "type": "wiki-template-name", "required": true }, "t": { "label": "template", "description": "Whether the title belongs to a template (needed for existence check)", "type": "line", "suggestedvalues": [ "yes", "no" ], "default": "no" } } } </templatedata>

It is the same as using {{TNT|Foo|uselang={{int:lang}}}} and this template was created to avoid the template looping issue when {{TNT}} is used on TNT again.

It is the same as using {{ :{{TNTN|Foo |uselang={{int:lang}} }} }} which does not loop too.

  • {{dynamite|title=template name|t=yes}}
  • {{dynamite|title=:page name}}

Examples

[edit source]

See [1] for an example usage.