Changes

Jump to navigation Jump to search
Created page with "<noinclude> This template is used to print the details of accepted core questions of the given discipline. It displays the descriptions of questions and other details of theor..."
<noinclude>
This template is used to print the details of accepted core questions of the given discipline. It displays the descriptions of questions and other details of theories accepted on a given topic by sorting them according to their topic's sorting order. Each question is presented under its own subheading.

The template is community-agnostic: it presents all the answers to the topic accepted by any community.


'''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.


'''Parameters:'''
* <code><nowiki>|discipline=</nowiki></code> - the discipline.
* <code><nowiki>|intro=</nowiki></code> - initial text that precedes the output, if at least some results exist.
* <code><nowiki>|outro=</nowiki></code> - text that is appended to the output, if at least some results exist.
* <code><nowiki>|default=</nowiki></code> - if, for any reason, the query returns no results, this will be printed instead.

</noinclude><includeonly><!--
-->{{#if: {{{topic|}}}<!--
-->|<!--

--><!-- Get the list of all core questions to see if there are any
-->{{#arraydefine: varQuestions<!--
-->|{{#ask:<!--
-->[[SubObjectCategory::Discipline Core Question]]<!--
-->[[Discipline::{{{discipline|}}}]]<!--
-->|?Question<!--
-->|mainlabel=-<!--
-->|headers=hide<!--
-->|sort=Sorting Order<!--
-->|order=asc<!--
-->|link=none<!--
-->|limit=10000<!--
-->}}<!--
-->| , |unique<!--
-->}}<!-- arraydefine

--><!-- remove duplicates
-->{{#arrayunique: varQuestions}}<!--

-->{{#ifeq: {{#arraysize: varQuestions}}|0<!--
-->|<!--

--><!-- Nothing is found: print the default and exit
-->{{{default|}}}<!--

-->|<!--

--><!-- Core questions are found

-->{{{intro|}}}<!--

--><!-- Print the core questions
-->{{#arrayprint: varQuestions||varQuestion<!--
-->|<!--
--><!--

--><!-- Add the heading
-->{{Heading|headingtext=[[varQuestion]]|level=3}}<!--

--><!-- get the theories that answer this question
-->{{#arraydefine: varAnswers<!--
-->|{{#ask:<!--
-->[[SubObjectCategory::Current Answer]]<!--
-->[[Topic::varQuestion]]<!--
-->[[Directness::Direct||Superanswer||Subanswer]]<!--
-->|?Theory<!--
-->|mainlabel=-<!--
-->|headers=hide<!--
-->|sort=Directness, Sorting Order<!-- direct answers will be printed first
-->|order=asc, asc<!--
-->|link=none<!--
-->|limit=10000<!--
-->}}<!--
-->| , |unique<!--
-->}}<!-- arraydefine

--><!-- remove duplicates
-->{{#arrayunique: varAnswers}}<!--

--><!-- print
-->{{#arrayprint: varAnswers||varTheory<!--
-->|<!--

-->{{PrintTheoryDetails<!--
-->|theory=varTheory<!--
-->|formulationtext=yes<!--
-->|formulationfile=yes<!--
-->|description=yes<!--
-->|link=yes<!--
-->}}<!--

-->}}<!--arrayprint

-->}}<!--arrayprint varQuestions

-->{{{outro|}}}<!--

-->}}<!-- ifeq arraysize

-->}}<!-- if
--></includeonly>

Navigation menu