Template:Example/doc: Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
imported>FrozenPlum
m (update the docs to be clearer)
imported>FrozenPlum
m (Undo revision 1551 by me, nope, what I had was fine)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- Documentation here -->
<!-- Documentation here -->
Creates a "view result" and "text in sandbox" link
Creates links to either parameter examples pages, or singular example pages.
==Usage==
==Usage==
* <code><nowiki>{{example|Non-existing page}}</nowiki></code> gives {{example|Non-existing page}}
* <code><nowiki>{{example|category}}</nowiki></code>
* <code><nowiki>{{example|Non-existing page|text label}}</nowiki></code> gives {{example|Non-existing page|text label}}
* <code><nowiki>{{example|category|noparam=any value}}</nowiki></code>
* <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|base=Main Page}}</nowiki></code>
* <code><nowiki>{{example|category|p=y}}</nowiki></code> gives {{example|category|p=y}} (prepends "Parameter:_" to the URL only)
* <code><nowiki>{{example|base=Criteria for page selection|category}}</nowiki></code> {{example|base=Criteria for page selection|category}}

<includeonly>
<includeonly>
<!-- Template categories/interwikis here -->
<!-- Template categories/interwikis here -->
[[Category:Templates]]
[[Category:Templates]]
[[Category:Link templates]]
[[Category:Link templates]]


</includeonly>
</includeonly>

Latest revision as of 04:43, 6 April 2022

This is the documentation page, it should be transcluded into the main template page. See Template:Documentation for more information

Creates a "view result" and "text in sandbox" link

Usage

  • {{example|category}}
  • {{example|category|noparam=any value}}
  • {{example|category|base=Main Page}}
  • {{example|base=Criteria for page selection|category}} Page Template:Example/style.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").