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.
==Usage==
==Example==
* <code><nowiki>{{example|Non-existing page}}</nowiki></code> gives {{example|Non-existing page}}
* <code><nowiki>{{example|category}}</nowiki></code> gives {{example|category}}
* <code><nowiki>{{example|Non-existing page|text label}}</nowiki></code> gives {{example|Non-existing page|text label}}
* <code><nowiki>{{example|category|alt text}}</nowiki></code> gives {{example|category|alt text}}
* <code><nowiki>{{example|category|text label|p=y}}</nowiki></code> gives {{example|category|text label|p=y}} (prepends "Parameter:_" to the URL only, where parameter pages will have multiple examples, plural, on the same page)
* <code><nowiki>{{example|category|text|eg=2}}</nowiki></code> gives {{example|category|text|eg=2}}
* <code><nowiki>{{example|category|p=y}}</nowiki></code> gives {{example|category|p=y}} (prepends "Parameter:_" to the URL only)
* <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 -->