Difference between revisions of "Template:Ifpreview/doc"

From blackwiki
Jump to navigation Jump to search
imported>Daask
(Add blank to first demo)
imported>Pppery
(←Redirected page to Template:If preview/doc)
 
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 ==
 
−
* {{demo|<nowiki>{{ifpreview|{{error|This error message will only be shown in previews}} | }}</nowiki>}}
 
−
* {{demo|<nowiki>{{ifpreview|Show this in previews|Show this on published pages, but not in previews}}</nowiki>}}
 
−
* {{demo|<nowiki>{{ifpreview|then=Show this in previews|else=Show this on published pages, but not in previews}}</nowiki>}}
 
−
* {{demo|<nowiki>{{ifpreview}}</nowiki>}}
 
−
 
 
−
<includeonly>{{sandbox other||
 
−
[[Category:If-then-else templates]]
 
−
}}</includeonly>
 

Latest revision as of 19:21, 22 February 2019