Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
ANRC Universe
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:If preview/doc
Template
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Documentation subpage}} {{High-use}} {{Lua|Module:If preview}} This is a template that helps other templates determine if they are being previewed or not, and do or display different things accordingly. == Usage == <code><nowiki>{{If preview|value if being previewed|value if not being previewed}}</nowiki></code> <code><nowiki>{{If preview|1=value if being previewed|2=value if not being previewed}}</nowiki></code> The first parameter is returned if the page is being previewed, otherwise the second parameter will be returned. Either parameter may be empty. ==Examples== Preview this page to see the effect of previewing on the 'Example' column. {|class=wikitable !Code !Example !Value when previewed !Value when saved |- |<code><nowiki>{{If preview|Yes|No}}</nowiki></code><br/><code><nowiki>{{If preview|1=Yes|2=No}}</nowiki></code> |{{If preview|Yes|No}}<br/>{{If preview|1=Yes|2=No}} |Yes |No |- |<code><nowiki>{{If preview|Red}}</nowiki></code><br/><code><nowiki>{{If preview|1=Red}}</nowiki></code> |{{If preview|Red}}<br/>{{If preview|1=Red}} |Red | |- |<code><nowiki>{{If preview||Blue}}</nowiki></code><br/><code><nowiki>{{If preview|2=Blue}}</nowiki></code> |{{If preview||Blue}}<br/>{{If preview|2=Blue}} | |Blue |} ==See also== * {{Tl|Preview warning}} <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:If-then-else templates]] }}</includeonly><noinclude> </noinclude>
Summary:
Please note that all contributions to ANRC Universe may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
ANRC Universe:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Pages included on this page:
Template:Documentation subpage
(
edit
)
Template:High-use
(
edit
)
Template:If preview
(
edit
)
Template:Lua
(
edit
)
Template:Mbox
(
edit
)
Template:Strong
(
edit
)
Template:Template link
(
edit
)
Template:Terminate sentence
(
edit
)
Template:Tl
(
edit
)
Module:Arguments
(
edit
)
Module:High-use
(
edit
)
Module:If preview
(
edit
)
Module:If preview/configuration
(
edit
)
Module:If preview/styles.css
(
edit
)
Module:List
(
edit
)
Module:Lua banner
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:TableTools
(
edit
)
Module:Text
(
edit
)
Module:Text/data
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/I
(
edit
)
Module:Yesno
(
edit
)
Search
Search
Editing
Template:If preview/doc
Add topic