Wikipedia:WikiProject User warnings/Design guidelines: Difference between revisions

Content deleted Content added
Civility: Spell
Tags: Mobile edit Mobile web edit Advanced mobile edit
Default values: clarify phrasing, use an example less likely to cause argument
Line 77:
===Parameters===
====Default values====
Nearly every parameter should have a default value, such that misuse does not break the template. You can set the default value of a parameter by using piped syntax (<code><nowiki>{{{1|default value}}}</nowiki></code>). For example, the template below takes a parameter; whichit expects the user to supply the propera [[pronounnoun]], but if they don't, it uses a default noun ("This").
<pre>{{{1|He or sheThis}}} is cool.</pre>
 
Supplied with the pronoun withnoun <code><nowiki>{{template|HeWikipedia}}</nowiki></code>, the template will expand to "HeWikipedia is cool". Ignoring<code><nowiki>{{template|This thehelp parameterpage}}</nowiki></code> will expand to "This help page is cool". If the with <code><nowiki>{{template}}</nowiki></code>, the template will defaultuse the default value, and expand to "He or sheThis is cool".
 
====Named syntax====