Template:Ifpreview/doc

From blackwiki
< Template:Ifpreview
Revision as of 04:51, 28 March 2018 by imported>Daask (Add named parameter example)
Jump to navigation Jump to search

Description

This template returns the then parameter if it is included in an editing preview, else it returns the else 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

  • {{ifpreview|{{error|This error message will only be shown in previews}}}}
  • {{ifpreview|Show this in previews|Show this on published pages, but not in previews}}
  • {{ifpreview}}