Difference between revisions of "Template:Class"
From TSAS Library
JStallings (talk | contribs) |
JStallings (talk | contribs) |
||
| Line 7: | Line 7: | ||
</repeat> | </repeat> | ||
<noinclude> | <noinclude> | ||
Plain course layout drawing from [[Table:Courses|Courses table]]. | Plain course layout drawing from [[Table:Courses|Courses table]] ([https://{{SERVERNAME}}/index.php?title=Table:Courses&action=viewdata data]). | ||
Param 1 completes <nowiki>criteria={{{1}}}</nowiki> so should include quotation marks and the use of <nowiki>{{=}}</nowiki> to transclude an equals sign. | Param 1 completes <nowiki>criteria={{{1}}}</nowiki> so should include quotation marks and the use of <nowiki>{{=}}</nowiki> to transclude an equals sign. | ||
Revision as of 20:08, 11 May 2019
<repeat table="Courses" criteria={{{1}}} sort={{{2}}}>
[[{{{coursename}}}]]
{{{teacher}}}
{{{description}}}
{{{requiredby}}}
</repeat>
Plain course layout drawing from Courses table (data).
Param 1 completes criteria={{{1}}} so should include quotation marks and the use of {{=}} to transclude an equals sign.
Param 2 completes sort={{{1}}}, but is not working at the moment...
<repeat table="Courses" criteria={{{1}}} sort={{{2}}}>
<h3 style="display:inline;">[[{{{coursename}}}]]</h3> <p style="float:right;">{{{teacher}}}</p>
{{{description}}}
<p style="margin-left:1em;">{{{requiredby}}}</p>
</repeat>Use:
{{class|"offered{{=}}19-20"|}}
Yields: <repeat table="Courses" criteria="offered=19-20" sort=>
[[{{{coursename}}}]]
{{{teacher}}}
{{{description}}}
{{{requiredby}}}
</repeat>
<repeat table="Courses" criteria="offered=19-20" sort=>
[[{{{coursename}}}]]
{{{teacher}}}
{{{description}}}
{{{requiredby}}}
</repeat> <templatedata> { "params": { "1": {}, "2": {} }, "format": "inline" } </templatedata>