Difference between revisions of "Template:PrintTermInheritedQuestionsHeaders"
Jump to navigation
Jump to search
Line 54: | Line 54: | ||
--><!-- | --><!-- | ||
--><!-- TODO: add the headers | --><!-- TODO: add the headers | ||
− | -->{{#var: varPage}}<!-- | + | --><!-- |
+ | --><!-- check if the page exists | ||
+ | -->{{#ifexist:{{#var: varPage}}<!-- | ||
+ | -->|{{#if: {{{link|}}}|[[{{#var: varPage}}]]|{{#var: varPage}}|}}<!-- link to the page | ||
+ | -->|<!-- doesn't exist, check if the formlink is expected | ||
+ | -->{{#if: {{{link|}}}<!-- | ||
+ | -->|<!-- return the formlink | ||
+ | -->{{#formlink:form=Topic|link text={{#var: varPage}}|target={{#var: varPage}}|query string=Topic[Subject]={{{term|}}}&Topic[Inherited From]=varQuestion|}}<!-- | ||
+ | -->|<!-- form link is not needed; return the name only | ||
+ | -->{{#var: varPage}}<!-- | ||
+ | -->}}<!-- if | ||
+ | -->}}<!-- if exists | ||
--><!-- | --><!-- | ||
-->}}<!--arrayprint | -->}}<!--arrayprint |
Revision as of 16:44, 19 January 2023
This template is used to print a list of question that a term can potentially inherit. The template searches for the heritable questions of the term's ancestors and decodes the formula of the question's title. If a page like that already exists, it provides a link to that page. If a page doesn't exist, it prints a redlink to the respective form with prefilled parameters for the easy creation of the page.
The template is a work in progress.
NOTE: As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.
Parameters:
|term=
- the term.|subfield=
- {Ontology, Dynamics, etc.}. Default is dynamics.|link=
- if not empty, a link to the respective page or a formlink (if the page doesn't exist) will be added.
unused for now:
|bullets=
- if yes, a bullet-list of answers will be produced. Otherwise,|linebreak=
- if yes, each community will start from a new line; if no (default), a mere space will be added between sentences.|communitiesfirst=
- if yes, the communities will be mentioned first in the sentence. If no (default) the name of the theory will appear first.