Template:DataProp/doc: Difference between revisions

Vergir (talk | contribs)
Fix doc page: restore Weapon example, clean up duplicate sections (with help from vergir-bot LLM)
Update not-found examples to show both entity and prop error messages (with help from vergir-bot LLM)
Line 53: Line 53:
Grit's barrier lasts {{DataProp|Grit|BarrierDuration}}s.
Grit's barrier lasts {{DataProp|Grit|BarrierDuration}}s.


=== Not found ===
=== Errors ===
If the entity or property does not exist, the template returns a visible error message.
If the entity does not exist:


<code>&#123;&#123;DataProp|Nonexistent Item|FakeProperty&#125;&#125;</code>
<code>&#123;&#123;DataProp|Nonexistent Thing|Whatever&#125;&#125;</code>


{{DataProp|Nonexistent Item|FakeProperty}}
{{DataProp|Nonexistent Thing|Whatever}}
 
If the entity exists but the property does not:
 
<code>&#123;&#123;DataProp|Abrams|FakeProp&#125;&#125;</code>
 
{{DataProp|Abrams|FakeProp}}


<includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
<includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>