Difference between revisions of "Template:HasProp"
From Salem Wiki
(Initial setup) |
m (Software upgrade) |
||
Line 1: | Line 1: | ||
<onlyinclude>{{#if: | <onlyinclude>{{#if: | ||
− | {{# | + | {{#show: |
− | + | {{{page|{{FULLPAGENAME}} }}} | |
|?{{{1}}} | |?{{{1}}} | ||
|link=none | |link=none |
Revision as of 18:54, 5 July 2012
Template documentation (for the template shown above, sometimes hidden or invisible)
Description
- This helper-template is used to determine if a page has any value for a certain property.
- It won't output anything at all when it can't find the property for the page, and simply output a 'yes' when it can.
- This behavior is essential for use in
{{#if:}}
constructs.
Syntax
- Type the below code somewhere inside your code:
{{HasProp|propname|page=pagename}}
- propname must be provided, as an un-named parameter! (else it will always output 'yes' as you can see..)
- page is an optional parameter and defaults to
{{FULLPAGENAME}}
, this is to aid in debugging pages and examples....
Examples
Visit Template:HasProp/doc to edit this text! (How does this work?)