Difference between revisions of "Template:Ifpreview/doc"

From blackwiki
Jump to navigation Jump to search
imported>Daask
(Add named parameter example)
imported>Pppery
(←Redirected page to Template:If preview/doc)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
−
{{Documentation subpage}}
+
#REDIRECT [[Template:If preview/doc]]
−
 
 
−
== Description ==
 
−
This template returns the <code>then</code> parameter if it is included in an ''editing preview'', else it returns the <code>else</code> parameter if it is included in a ''saved page''. This can be useful for giving instructions to editors before they save the page, without those instructions cluttering the saved page if work is done incorrectly.
 
−
== Usage ==
 
−
* {{tlx|ifpreview|{{tlg|error|This error message will only be shown in previews}}}}
 
−
* {{tlx|ifpreview|Show this in previews|Show this on published pages, but not in previews}}
 
−
* {{tlx|ifpreview|then=Show this in previews|else=Show this on published pages, but not in previews}}
 
−
 
 
−
<includeonly>{{sandbox other||
 
−
[[Category:If-then-else templates]]
 
−
}}</includeonly>
 

Latest revision as of 19:21, 22 February 2019