Difference between revisions of "Template:CourseList"

From TSAS Library
Jump to: navigation, search
(Created page with "<noinclude> This is the 'Course List' template; it should be called in the following format: <pre> {{CourseList|COLUMNNAME}} </pre> It transcludes the template {{Tl|CourseDisp...")
 
 
(10 intermediate revisions by the same user not shown)
Line 2: Line 2:
This is the 'Course List' template; it should be called in the following format:
This is the 'Course List' template; it should be called in the following format:
<pre>
<pre>
{{CourseList|COLUMNNAME}}
{{CourseList|COLUMNNAME|2|3}}
</pre>
</pre>
Where <code>COLUMNNAME</code> can equal:
* teacher
* requiredby
* department
{| class="wikitable"
|-
! Param !! Value
|-
| 2 || Add pipe to hide teacher
|-
| 3 || Add pipe to hide description
|}
It transcludes the template {{Tl|CourseDisplay}}, which manages the individual entries. Edit the page to see the source code.
It transcludes the template {{Tl|CourseDisplay}}, which manages the individual entries. Edit the page to see the source code.
</noinclude><includeonly>
</noinclude><includeonly>
{{#cargo_query:tables=Courses
{{#cargo_query:tables=Courses
|where=Courses.{{{1}}}="{{PAGENAME}}"
|where=Courses.{{{1}}} HOLDS "{{PAGENAME}}"
|fields=Courses._pageName=coursename,description,teacher,requiredby
|fields=Courses._pageName=coursename,{{{3|description,}}}{{{2|teacher,}}}requiredby
|format=template
|format=template
|template=CourseDisplay
|template=CourseDisplay
|named args=yes
|named args=yes
|order by=Date DESC
|delimiter=<br />
}}
}}
</includeonly>
</includeonly>

Latest revision as of 19:26, 24 April 2020

This is the 'Course List' template; it should be called in the following format:

{{CourseList|COLUMNNAME|2|3}}

Where COLUMNNAME can equal:

  • teacher
  • requiredby
  • department
Param Value
2 Add pipe to hide teacher
3 Add pipe to hide description

It transcludes the template {{CourseDisplay}}, which manages the individual entries. Edit the page to see the source code.