Difference between revisions of "Template:PrintTheoryTitleAuthorYearResource"
Jump to navigation
Jump to search
(5 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 includes: | + | 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 title of the theory; | ||
* the names of the authors; | * the names of the authors; | ||
Line 14: | 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 |
− | -->{{#vardefine: | + | -->|{{#vardefine: varTitle|{{#show: {{{theory|}}}|?Title}}|}}<!-- |
− | + | --><!-- | |
− | --><!-- | + | -->{{#if: {{#var: varTitle}}<!-- |
− | -->{{#switch: {{#var: varCount}}<!-- | + | -->|<!-- |
− | + | -->|{{#vardefine: varTitle|{{{theory|}}}|}}<!-- the title is not found - use the theory name instead | |
− | + | -->}}<!-- if | |
− | -->}}<!-- switch varCount | + | --><!-- |
− | --><!-- | + | -->{{#ifeq: {{#show: {{{theory|}}}|?Theory Type}}|Definition<!-- |
− | -->{{ | + | -->|<!-- definition |
− | --> in {{#show: {{{theory|}}}|?Year | + | -->This definition of ''{{#var: varTitle}}'' was formulated by <!-- |
+ | -->|<!-- nondefinition | ||
+ | --><!-- 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 <!-- | ||
+ | -->|This version of ''{{#var: varTitle}}'' was formulated by <!-- | ||
+ | -->}}<!-- 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.