Difference between revisions of "Template:PrintDisciplineAcceptedCoreQuestionsDetails"

From Encyclopedia of Scientonomy
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...")
 
 
(9 intermediate revisions by the same user not shown)
Line 15: Line 15:
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
-->{{#if: {{{topic|}}}<!--
+
-->{{#if: {{{discipline|}}}<!--
 
  -->|<!--  
 
  -->|<!--  
  
 
   --><!-- Get the list of all core questions to see if there are any
 
   --><!-- Get the list of all core questions to see if there are any
   -->{{#arraydefine: varQuestions<!--
+
   -->{{#arraydefine: arrayQuestions<!--
 
   -->|{{#ask:<!--
 
   -->|{{#ask:<!--
 
     -->[[SubObjectCategory::Discipline Core Question]]<!--
 
     -->[[SubObjectCategory::Discipline Core Question]]<!--
 
     -->[[Discipline::{{{discipline|}}}]]<!--
 
     -->[[Discipline::{{{discipline|}}}]]<!--
     -->|?Question<!--
+
     -->|?Core Question<!--
 
     -->|mainlabel=-<!--
 
     -->|mainlabel=-<!--
 
     -->|headers=hide<!--
 
     -->|headers=hide<!--
Line 35: Line 35:
  
 
   --><!-- remove duplicates
 
   --><!-- remove duplicates
   -->{{#arrayunique: varQuestions}}<!--
+
   -->{{#arrayunique: arrayQuestions}}<!--
 
   
 
   
   -->{{#ifeq: {{#arraysize: varQuestions}}|0<!--
+
   -->{{#ifeq: {{#arraysize: arrayQuestions}}|0<!--
 
   -->|<!--  
 
   -->|<!--  
 
   
 
   
Line 50: Line 50:
  
 
     --><!-- Print the core questions
 
     --><!-- Print the core questions
     -->{{#arrayprint: varQuestions||varQuestion<!--
+
     -->{{#arrayprint: arrayQuestions||varQuestion<!--
 
     -->|<!--
 
     -->|<!--
 
       --><!--
 
       --><!--
Line 56: Line 56:
 
       --><!-- Add the heading
 
       --><!-- Add the heading
 
       -->{{Heading|headingtext=[[varQuestion]]|level=3}}<!--
 
       -->{{Heading|headingtext=[[varQuestion]]|level=3}}<!--
 +
 +
      --><!-- Add the question and the description
 +
      --><p>{{#show: varQuestion|?Core Question|link=none}}</p><!--
 +
      -->{{PrintTopicAcceptedTheoriesFormulations<!--
 +
      -->|topic=varQuestion<!--
 +
      -->|link=yes<!--   
 +
      -->}}</p><!--
  
 
       --><!-- get the theories that answer this question
 
       --><!-- get the theories that answer this question
Line 77: Line 84:
 
       -->{{#arrayunique: varAnswers}}<!--
 
       -->{{#arrayunique: varAnswers}}<!--
  
       --><!-- print
+
       --><!-- check the array size and print the details
       -->{{#arrayprint: varAnswers||varTheory<!--
+
       -->{{#ifeq: {{#arraysize: varAnswers}}|0||<p></p>
      -->|<!--
+
====Details====
 +
<div class="mw-collapsible mw-collapsed"><!--
 +
 
 +
      --><!-- print
 +
      -->{{#arrayprint: varAnswers||varTheory<!--
 +
        -->|<!--
 +
 
 +
        -->{{PrintTheoryDetails<!--
 +
          -->|theory=varTheory<!--
 +
          -->|formulationtext=yes<!--
 +
          -->|formulationfile=yes<!--
 +
          -->|description=yes<!--
 +
          -->|link=yes<!--
 +
        -->}}<!--  
  
        -->{{PrintTheoryDetails<!--
+
      -->}}<!--arrayprint
        -->|theory=varTheory<!--
+
     
        -->|formulationtext=yes<!--
+
      -->
        -->|formulationfile=yes<!--
 
        -->|description=yes<!--
 
        -->|link=yes<!--
 
        -->}}<!--
 
  
      -->}}<!--arrayprint
+
</div><!--
  
     -->}}<!--arrayprint varQuestions
+
      -->}}<!-- ifeq
 +
 
 +
     -->}}<!--arrayprint arrayQuestions
  
 
     -->{{{outro|}}}<!--
 
     -->{{{outro|}}}<!--

Latest revision as of 08:34, 30 June 2024

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:

  • |discipline= - the discipline.
  • |intro= - initial text that precedes the output, if at least some results exist.
  • |outro= - text that is appended to the output, if at least some results exist.
  • |default= - if, for any reason, the query returns no results, this will be printed instead.