Difference between revisions of "Template:Class"
From TSAS Library
JStallings (talk | contribs) |
JStallings (talk | contribs) |
||
| Line 1: | Line 1: | ||
<repeat table="Courses" criteria="{{{1}}}" sort="{{{2}}}"> | <repeat table="Courses" criteria="{{{1}}}" sort="{{{2}}}"> | ||
<h3 style="display:inline;">[[{{{coursename}}}]]</h3> {{{3|<p style="float:right;">{{{teacher}}}</p>}}} | <h3 style="display:inline;">[[{{{coursename}}}]]</h3> {{{3|<p style="float:right;">{{{teacher}}}</p>}}} | ||
{{{4| | |||
{{{4|{{{description}}}}}} | {{{description}}} | ||
}}} | |||
<p style="margin-left:1em;">{{{requiredby}}}</p> | <p style="margin-left:1em;">{{{requiredby}}}</p> | ||
</repeat><noinclude> | </repeat><noinclude> | ||
| Line 37: | Line 37: | ||
==Yields== | ==Yields== | ||
{{class|offered{{=}}19-20|coursename | {{class|offered{{=}}19-20|coursename}} | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 20:02, 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}}}
| coursename | sessions | offered | CC |
| description | prerequisites | opento | FA |
| department | note | requiredby | LA |
| teacher | grcode | 09-12 | ST |
Use
Current Offerings
{{class|offered{{=}}19-20||}}
=Teacher Courses
Note Note:Add a space into Param 3 to remove teacher name
{{class|teacher{{=}}{{PAGENAME}}, grcode{{=}}EL|coursename| |}}
{{class|teacher{{=}}{{PAGENAME}}, grcode!{{=}}EL|coursename| |}}
Department List
{{class|department={{PAGENAME}}}, grcode{{=}}EL|coursename||}}
{{class|department={{PAGENAME}}}, grcode!{{=}}EL|coursename||}}
Yields
<repeat table="Courses" criteria="offered=19-20" sort="coursename">
[[{{{coursename}}}]]
{{{teacher}}}
{{{description}}}
{{{requiredby}}}
</repeat>
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]
| The above documentation is transcluded from Template:Class/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |