Template:Example/doc: Difference between revisions
Content deleted Content added
imported>FrozenPlum m update the docs to be clearer |
imported>FrozenPlum m update docs to match |
||
Line 2: | Line 2: | ||
<!-- Documentation here --> |
<!-- Documentation here --> |
||
Creates links to either parameter examples pages, or singular example pages. |
Creates links to either parameter examples pages, or singular example pages. |
||
== |
==Example== |
||
* <code><nowiki>{{example| |
* <code><nowiki>{{example|category}}</nowiki></code> gives {{example|category}} |
||
* <code><nowiki>{{example| |
* <code><nowiki>{{example|category|alt text}}</nowiki></code> gives {{example|category|alt text}} |
||
* <code><nowiki>{{example|category|text |
* <code><nowiki>{{example|category|text|eg=2}}</nowiki></code> gives {{example|category|text|eg=2}} |
||
* <code><nowiki>{{example| |
* <code><nowiki>{{example|random example|nonparam=any value}}</nowiki></code> gives {{example|random example|nonparam=any value}} |
||
* <code><nowiki>{{example|random example|override text|nonparam=any value|eg=2}}</nowiki></code> gives {{example|random example|override text|nonparam=any value|eg=2}} |
|||
<includeonly> |
<includeonly> |
||
<!-- Template categories/interwikis here --> |
<!-- Template categories/interwikis here --> |
Revision as of 23:58, 5 April 2022
[purge]
This is the documentation page, it should be transcluded into the main template page. See Template:Documentation for more informationCreates links to either parameter examples pages, or singular example pages.
Example
{{example|category}}
gives Page Template:Example/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
{{example|category|alt text}}
gives Page Template:Example/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
{{example|category|text|eg=2}}
gives Page Template:Example/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
{{example|random example|nonparam=any value}}
gives Page Template:Example/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
{{example|random example|override text|nonparam=any value|eg=2}}
gives Page Template:Example/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").