Template:Template link expanded/doc: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content deleted Content added
m +ia
explained use of nowiki-keyword parameters; added "Exceptions" for when template usage is too complicated.
Line 18: Line 18:
'''<big>Purpose and naming:</big>''' [[Wikt:mnemonic|Mnemonically]] ''''T'''emplate '''l'''ist e'''x'''panded'... after <tt>{{tlx|tl}}</tt> '''T'''emplate '''l'''ist'
'''<big>Purpose and naming:</big>''' [[Wikt:mnemonic|Mnemonically]] ''''T'''emplate '''l'''ist e'''x'''panded'... after <tt>{{tlx|tl}}</tt> '''T'''emplate '''l'''ist'


* This template takes another ''template-name'' and some associated [[w:pipe-trick|pipe-tricked]] [http://meta.wikimedia.org/wiki/Parameter#Parameters (numbered) parameters] (or 'pass parameters'), and aggregates them into an 'example demonstration' of how the ''template-name'' template might be used. It's primary use is in instruction and documentation such as this passage.
* This template takes another ''template-name'' and some associated [[w:pipe-trick|pipe-tricked]] [http://meta.wikimedia.org/wiki/Parameter#Parameters (numbered) parameters] (or 'pass parameters'), and displays them as an 'example demonstration' of how the ''template-name'' template could be coded, literally. It's primary use is in instruction and documentation.


* Up to five pass parameters (numbered) for the specified template are displayed as 'placeholders', and more parameters are shown as "<tt>|</tt>''...''", for details see the [[w:{{TALKPAGENAME}}|this talk]] page.
* '''''Specifics:''''' Up to five pass parameters (numbered or nowiki-keywords) for the specified template are displayed as 'placeholders', and over 5 parameters can be displayed using a coded vertical-bar (as in "<small>&amp;#124;</small>''...''"). A keyword parameter can be used, when tagged as a nowiki-keyword: <nowiki>"<nowiki>siz=10<\nowiki>"</nowiki> with each keyword parameter surrounded by <nowiki>"<nowiki>"</nowiki> tags; see ''[[#Examples|Examples]]'' at bottom. For more details, see the [[w:{{TALKPAGENAME}}|this talk]] page.


* '''''Exceptions:''''' If the intended template lists numerous/keyword parameters, then perhaps this template should really ''not'' be used, and just hardcode the usage in double-braces, putting only nowiki-braces <nowiki>"{{"</nowiki> to start, such as: "<nowiki><nowiki>{{</nowiki><\nowiki>Anytemplate |arg1=23 |siz=250px}}".
----
----