Template:Requires/doc: Difference between revisions
Jump to navigation
Jump to search
(Create.) |
m (+As expected it will fail when used on the "Treebark" page.) |
||
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
;Usage | ;Usage | ||
:Default: <code>{{t|Requires | :Default: <code>{{t|Requires|<Property-Name>}}</code> | ||
:It will look in the target property for <nowiki>{{PAGENAME}}</nowiki> items. | :It will look in the target property for <nowiki>{{PAGENAME}}</nowiki> items. | ||
Line 17: | Line 17: | ||
;Caveat: | ;Caveat: | ||
:To do this inside a single template the returned Ask-Query is generate first, and than re-processed in its entirety. | :To do this inside a single template the returned Ask-Query is generate first, and than re-processed in its entirety. | ||
:... Meaning this can only handle strings within a certain lengt (1000 | :... Meaning this can only handle strings within a certain lengt (''1000 characters''). | ||
:... ''As expected it will fail when used on the "Treebark" page. To many trees returned in that case.'' | |||
<includeonly>[[Category:SMW templates|{{PAGENAME}}]]{{DEFAULTSORT:Requires}}</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude> | <includeonly>[[Category:SMW templates|{{PAGENAME}}]]{{DEFAULTSORT:Requires}}</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude> |
Latest revision as of 20:34, 9 August 2022
- Description
- This template executes a specific Ask-query, related to the page its used on, and return the resulting values(page-names) into Required items.
- Or: A Ask-query result like "abc, def, ghi" becomes "[[requires::abc]], [[requires::def]], [[requires::ghi]]"
- Currently created to process tree-lists for general tree products. (as there are a lot of trees, and (some) tree products have there own useful properties for this)
- Usage
- Default:
{{Requires|<Property-Name>}}
- It will look in the target property for {{PAGENAME}} items.
- Usable properties
- Trees barktype
- Trees branchtype
- ...
- Caveat
- To do this inside a single template the returned Ask-Query is generate first, and than re-processed in its entirety.
- ... Meaning this can only handle strings within a certain lengt (1000 characters).
- ... As expected it will fail when used on the "Treebark" page. To many trees returned in that case.