Difference between revisions of "Template:GetTopicCurrentAnswerFormulationText"
Jump to navigation
Jump to search
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This template returns the list of formulation texts of the current answers to the topic. If the topic doesn't have a formula for combining multiple answers, this will be a comma separated list; otherwise the formulations will be combined according to the formula. Suppose the question ''Epistemic Stances Towards Theories'' has several accepted answers, such as: | This template returns the list of formulation texts of the current answers to the topic. If the topic doesn't have a formula for combining multiple answers, this will be a comma separated list; otherwise the formulations will be combined according to the formula. Suppose the question ''Epistemic Stances Towards Theories'' has several accepted answers, such as: | ||
− | * | + | * The stance of theory acceptance can be taken towards theories. |
− | * | + | * The stance of theory pursuit can be taken towards theories. |
− | * | + | * The stance of theory use can be taken towards theories. |
The template will return: | The template will return: | ||
− | * | + | * The stances of theory acceptance, theory pursuit, and theory use can be taken towards theories. |
'''NOTE:''' As any "get" template, it doesn't save anything, but merely returns a value. | '''NOTE:''' As any "get" template, it doesn't save anything, but merely returns a value. | ||
Line 13: | Line 13: | ||
* <code><nowiki>|community=</nowiki></code> - the community. | * <code><nowiki>|community=</nowiki></code> - the community. | ||
* <code><nowiki>|topic=</nowiki></code> - the topic. | * <code><nowiki>|topic=</nowiki></code> - the topic. | ||
+ | * <code><nowiki>|separator=</nowiki></code> - the separator to be used for multiple answers if there is no formula; the default is a space (since the formulations are usually full sentences). | ||
</noinclude><includeonly><!-- | </noinclude><includeonly><!-- | ||
Line 68: | Line 69: | ||
--><!-- Get the topic's subject and predicate | --><!-- Get the topic's subject and predicate | ||
--><!-- | --><!-- | ||
− | -->{{#vardefine: varSubject|{{#show: {{ | + | -->{{#vardefine: varSubject|{{#show: {{#arrayindex: arrayTheories|0}}|?Subject|link=none}}|}}<!-- NOTE: the subject is to be taken from the theory, rather than the topic to make sure this works with subtypes/supertypes |
-->{{#vardefine: varPredicate|{{#show: {{{topic|}}}|?Predicate|link=none}}|}}<!-- | -->{{#vardefine: varPredicate|{{#show: {{{topic|}}}|?Predicate|link=none}}|}}<!-- | ||
--><!-- | --><!-- | ||
Line 81: | Line 82: | ||
-->}}<!-- arraydefine objects | -->}}<!-- arraydefine objects | ||
-->{{#arrayunique: varSubjectObjects}}<!-- | -->{{#arrayunique: varSubjectObjects}}<!-- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
--><!-- | --><!-- | ||
+ | |||
--><!-- | --><!-- | ||
− | -->{{DecodeTextFormula|formula={{#var: varMultipleFormula}}|subject={{#var: varSubject}}| | + | -->{{DecodeTextFormula|formula={{#var: varMultipleFormula}}|subject={{#var: varSubject}}|predicate={{#var: varPredicate}}|object={{#arrayprint: varSubjectObjects}}|link=yes}}<!-- |
--><!-- | --><!-- | ||
Line 99: | Line 92: | ||
--><!-- | --><!-- | ||
-->{{#arrayprint: arrayTheories||varTheory|<!-- | -->{{#arrayprint: arrayTheories||varTheory|<!-- | ||
− | -->{{#show: varTheory|?Formulation Text|link=none}} | + | -->{{#show: varTheory|?Formulation Text|link=none}}{{{separator| }}}<!-- |
--><!-- | --><!-- | ||
-->}}<!-- arrayprint | -->}}<!-- arrayprint |
Latest revision as of 00:13, 28 February 2023
This template returns the list of formulation texts of the current answers to the topic. If the topic doesn't have a formula for combining multiple answers, this will be a comma separated list; otherwise the formulations will be combined according to the formula. Suppose the question Epistemic Stances Towards Theories has several accepted answers, such as:
- The stance of theory acceptance can be taken towards theories.
- The stance of theory pursuit can be taken towards theories.
- The stance of theory use can be taken towards theories.
The template will return:
- The stances of theory acceptance, theory pursuit, and theory use can be taken towards theories.
NOTE: As any "get" template, it doesn't save anything, but merely returns a value.
Parameters:
|community=
- the community.|topic=
- the topic.|separator=
- the separator to be used for multiple answers if there is no formula; the default is a space (since the formulations are usually full sentences).