Template:PageOrDefault

From Maths
Revision as of 06:49, 13 December 2016 by Alec (Talk | contribs) (Created page with "<noinclude> ==Description== {{C|PageOrDefault}} evaluates to the transclusion of a page - ''if it exists'' - otherwise it returns the default. ==Examples== # {{C|<nowiki>{{Pag...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

PageOrDefault evaluates to the transclusion of a page - if it exists - otherwise it returns the default.

Examples

  1. {{PageOrDefault|Existing page|default}} evaluates to the contents of Existing page as if one wrote {{:Existing page}}
  2. {{PageOrDefault|Non-existent page|default}} evaluates to default

Parameters

  1. 1 or page for the page to check existence of
  2. 2 or default for the other case