Difference between revisions of "Template:Concept/render relation as form link"
From TDWG Terms Wiki
m (debug formlink generation) |
m (removed debug) |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
-->{{#vardefine: relationProperty|{{#sub: {{{1}}}|{{#expr: {{#pos:{{{1}}}|:}} + 1 }} }} }}<!-- | -->{{#vardefine: relationProperty|{{#sub: {{{1}}}|{{#expr: {{#pos:{{{1}}}|:}} + 1 }} }} }}<!-- | ||
− | + | DEBUG: <div style="display:none;">{{{1}}} → #var: relationProperty = {{#var: relationProperty}}</div> | |
+ | --><!-- | ||
-->{{#vardefine: foundResultList|{{#ask: [[{{{userparam|{{PAGENAME}} }}}]]|?{{#var: relationProperty}}#= | mainlabel=- | link=none | format=list | default= | limit=50 }} }}<!-- | -->{{#vardefine: foundResultList|{{#ask: [[{{{userparam|{{PAGENAME}} }}}]]|?{{#var: relationProperty}}#= | mainlabel=- | link=none | format=list | default= | limit=50 }} }}<!-- | ||
-->{{#if: {{#var: foundResultList}}<!-- | -->{{#if: {{#var: foundResultList}}<!-- | ||
Line 24: | Line 25: | ||
-->|tooltip={{#if: {{#var: pageExist}} |Edit this concept scheme|Create “§” as concept scheme}}<!-- | -->|tooltip={{#if: {{#var: pageExist}} |Edit this concept scheme|Create “§” as concept scheme}}<!-- | ||
-->}} | -->}} | ||
− | |vann: | + | |vann:termGroup={{#formlink: |
form=Concept collection<!-- | form=Concept collection<!-- | ||
-->|link text={{#if: {{#var: pageExist}} |[[File:Pencil.png|x16px|link=]]|[[File:Pencil add.png|x16px|link=]]}}<!-- | -->|link text={{#if: {{#var: pageExist}} |[[File:Pencil.png|x16px|link=]]|[[File:Pencil add.png|x16px|link=]]}}<!-- |
Latest revision as of 12:53, 15 November 2012
Sub page of Template:Concept, it renders a relation (concept scheme, concept collection) as a link with a form link. Data input is from an #ask query iterating through all applicable properties.
Parameters
- {{{1}}}: a property page name (the #sub/#pos removes "Property:", e.g. "Property:biorel:derives_from" → "biorel:derives_from")
- {{{2}}}: property: terms-internal:conceptRelationDisplayText
- {{{userparam}}}: passed by the calling ask query
Output:
Scheme: Audubon Core
See also: