Difference between revisions of "Template:ProjectProposalByResArea"

From AIRWiki
Jump to: navigation, search
m ({{{1}}})
 
(27 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
</nowiki></pre>
 
</nowiki></pre>
  
Source Code:
+
Pay attention to the missing newline after <nowiki><includeonly></nowiki> tag, is by design to avoid unnecessary newlines.
 +
</noinclude>
  
<pre><nowiki>
+
<includeonly>{{#if: {{#ask: [[Category:ProjectProposal]] [[PrjResArea::{{{1}}}]][[PrjStatus::Active]]}} | ===== {{{1}}} =====
<includeonly>
+
===== {{{1}}} =====
+
{{#ask: [[Category:ProjectProposal]] [[PrjResArea::{{{1}}}]]
+
| ?PrjTitle
+
| ?PrjImage
+
| ?PrjDescription
+
| ?PrjTutor
+
| ?PrjStarts
+
| ?PrjStudMin
+
| ?PrjStudMax
+
| ?PrjCFUMin
+
| ?PrjCFUMax
+
| ?PrjResArea
+
| ?PrjResTopic
+
| format = template
+
| template = ProjectProposalViz
+
}}
+
</includeonly>
+
</nowiki></pre>
+
</noinclude>
+
  
<includeonly>
+
{{#ask: [[Category:ProjectProposal]] [[PrjResArea::{{{1}}}]][[PrjStatus::Active]]
===== {{{1}}} =====
+
{{#ask: [[Category:ProjectProposal]] [[PrjResArea::{{{1}}}]]
+
 
| ?PrjTitle
 
| ?PrjTitle
 
| ?PrjImage
 
| ?PrjImage
 
| ?PrjDescription
 
| ?PrjDescription
| ?PrjTutor
+
| ?PrjTutor#
 
| ?PrjStarts
 
| ?PrjStarts
 
| ?PrjStudMin
 
| ?PrjStudMin
Line 47: Line 26:
 
| template = ProjectProposalViz
 
| template = ProjectProposalViz
 
}}
 
}}
</includeonly>
+
}}</includeonly>

Latest revision as of 00:25, 7 January 2015

This template takes as first input a Research Area and returns a paragraph with title that Area and containing all the ProjectProposal belonging to that Area, visualizing it with the Template:ProjectProposalViz. It can be used to dynamically generate list of ProjectProposal grouped by their Research Area, with the following query:

   {{#ask: [[Category:Research Area]]|format=template|template=ProjectProposalByResArea}}

Pay attention to the missing newline after <includeonly> tag, is by design to avoid unnecessary newlines.