Difference between revisions of "Template:PrintTheoryTitleAuthorYearResource"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
(Created page with "<noinclude> This template is used to format the sentence that this formulation was suggested by such-and-such author in year such-and-such. It also adds a link to the bibliogr...")
 
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This template is used to format the sentence that this formulation was suggested by such-and-such author in year such-and-such. It also adds a link to the bibliographic resource, if any. It also checks to see if there are any other theories with the same title; if there are several theories with the same title, the text will say "This version of the theory was formulated by...".
+
This template is used to format the sentence that this formulation/definition was suggested by such-and-such author in year such-and-such. It includes:
 +
* the title of the theory;
 +
* the names of the authors;
 +
* the formulation hear;
 +
* a link to the bibliographic resource, if any.  
 +
 
 +
It also checks to see if there are any other theories with the same title; if there are several theories with the same title, the text will say "This version of the theory was formulated by...".
  
 
'''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.
 
'''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.
Line 8: Line 14:
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
--><!-- get the title of this theory
+
-->{{#if: {{{theory|}}}<!--
-->{{#vardefine: varTitle| {{#show: {{{theory|}}}|?Title}} |}}<!--
+
--><!--
--><!--
+
--><!-- get the title of this theory
--><!-- find if there are any other theories with this exact title
+
-->|{{#vardefine: varTitle|{{#show: {{{theory|}}}|?Title}}|}}<!--
-->{{#vardefine: varCount| <!--
+
  --><!--
-->{{#ask: [[Category:Descriptive Theory]] [[Title::{{#var: varTitle}}]]; | [[Category:Normative Theory]] [[Title::{{#var: varTitle}}]]; | format=count}}<!--
+
  -->{{#if: {{#var: varTitle}}<!--
-->}}<!-- vardefine Count
+
  -->|<!--
--><!--
+
  -->|{{#vardefine: varTitle|{{{theory|}}}|}}<!-- the title is not found - use the theory name instead
-->{{#switch: {{#var: varCount}}<!--
+
  -->}}<!-- if
-->|1={{#var: varTitle}} was formulated by <!--
+
  --><!--
-->|This version of {{#var: varTitle}} was formulated by <!--
+
  -->{{#ifeq: {{#show: {{{theory|}}}|?Theory Type}}|Definition<!--
-->}}<!-- switch varCount
+
  -->|<!-- definition
--><!--
+
    -->This definition of ''{{#var: varTitle}}'' was formulated by&#32;<!--
-->{{PrintTheoryAuthors|theory={{{theory|}}}|links=yes|pretty=yes}}<!--
+
  -->|<!-- nondefinition
--> in {{#show: {{{theory|}}}|?Year Formulated|link=none}}.{{#if: {{#show: {{{theory|}}}|?Resource|link=none}}|[[CiteRef::{{#show: {{{theory|}}}|?Resource|link=none}}]]|}}</includeonly>
+
    --><!-- find if there are any other theories with this exact title
 +
    -->{{#vardefine: varCount|{{#ask: [[Category:Theory]] [[Title::{{#var:varTitle}}]]|format=count}} |}}<!-- vardefine Count
 +
    --><!--
 +
    -->{{#switch: {{#var: varCount}}<!--
 +
    -->|0|1=''{{#var: varTitle}}'' was formulated by&#32;<!--
 +
    -->|This version of ''{{#var: varTitle}}'' was formulated by&#32;<!--
 +
    -->}}<!-- switch varCount
 +
  -->}}<!-- ifeq
 +
  --><!--
 +
  -->{{PrintElementAuthors|element={{{theory|}}}|link=all|pretty=yes}}<!--
 +
  --> in {{#show: {{{theory|}}}|?Formulated Year|link=none}}.{{#if: {{#show: {{{theory|}}}|?Resource|link=none}}|[[CiteRef::{{#show: {{{theory|}}}|?Resource|link=none}}]]|}}<!--
 +
  --><!--
 +
-->}}<!-- if theory
 +
--></includeonly>

Latest revision as of 15:08, 7 December 2016

This template is used to format the sentence that this formulation/definition was suggested by such-and-such author in year such-and-such. It includes:

  • the title of the theory;
  • the names of the authors;
  • the formulation hear;
  • a link to the bibliographic resource, if any.

It also checks to see if there are any other theories with the same title; if there are several theories with the same title, the text will say "This version of the theory was formulated by...".

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

Parameters:

  • |theory= - the fullpagename of the theory.