Difference between revisions of "Template:HasProp/doc"
From Salem Wiki
m (→Syntax: added info for un-proper use.) |
m (→Examples: adding examples) |
||
Line 10: | Line 10: | ||
==Examples== | ==Examples== | ||
− | # | + | #{{t|HasProp|page<nowiki>=</nowiki>GameMenu|IsGameMenu}} ⇒ ´{{HasProp|page=GameMenu|IsGameMenu}}´ |
+ | #{{t|HasProp|page<nowiki>=</nowiki>GameMenu|IsGameMenus}} ⇒ ´{{HasProp|page=GameMenu|IsGameMenus}}´ | ||
<includeonly>[[Category:Templates|{{PAGENAME}}]]<!-- Any categories for the template itself --> | <includeonly>[[Category:Templates|{{PAGENAME}}]]<!-- Any categories for the template itself --> | ||
[[Category:Templates/©TriMoon™|{{SUBPAGENAME}}]] | [[Category:Templates/©TriMoon™|{{SUBPAGENAME}}]] | ||
</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude> | </includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude> |
Revision as of 06:38, 27 June 2012
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....