Cargo and Page Forms: Difference between revisions
From TSAS Library
JStallings (talk | contribs) No edit summary |
JStallings (talk | contribs) No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Frequently Used== | |||
* [[Template:Class]] fills table Classes from [[Form:Class]] and holds all current and previously offered classes | |||
* [[Template:FacultyStaff]] fills table FacultyStaff from [[Form:FacultyStaff]] and holds current/former faculty | |||
===How to=== | ===How to=== | ||
<pre>#cargo_declare</pre> defines the CARGO TABLE and the headers therein in the form of FIELD(TABLEHEADER)=DATATYPE. There can be no spaces or punctuation in these field names. | <pre>#cargo_declare</pre> defines the CARGO TABLE and the headers therein in the form of FIELD(TABLEHEADER)=DATATYPE. There can be no spaces or punctuation in these field names. | ||
Line 21: | Line 25: | ||
|-<pre>#cargo_store</pre> | |-<pre>#cargo_store</pre> | ||
|Name | |Name | ||
|<pre>{{{Name|}}} | |<pre>{{{Name|}}}</pre> | ||
|-Infobox class | |-Infobox class | ||
|name | |name | ||
Line 41: | Line 45: | ||
</pre> | </pre> | ||
OR | |||
<pre><repeat table="Courses" criteria="grcode={{PAGENAME}}"> | |||
<h3 style="display:inline;">[[{{{coursename}}}]]</h3> <p style="float:right;>{{{teacher}}}</p> | |||
{{{description}}} | |||
<p style="margin-left:1em;">{{{requiredby}}}</p> | |||
</repeat></pre> | |||
Subject Pages/Department Pages Category:Departments | |||
* Computer and Information Sciences | 'There should be a distinction between ''disciplines'' and ''departments''' | ||
* | * [[Computer and Information Sciences]] in [[Science]] | ||
* English Language and Literature | * [[Electives]] N/A | ||
* Fine and Performing Arts | * [[English Language and Literature]] [[English]] | ||
* Foreign Language and Literature | * [[Fine and Performing Arts]] [[Fine Arts]] | ||
* Language Arts | * [[Foreign Language and Literature]] [[Modern Languages]] | ||
* Mathematics | * [[Language Arts]] [[English]] | ||
* Physical, Health and Safety Education | * [[Mathematics]] [[Mathematics]] | ||
* Science | * [[Physical, Health and Safety Education]] [[Fine Arts]] | ||
* Social Sciences and History | * [[Science]] [[Science]] | ||
* [[Social Sciences and History]] [[History]] |
Latest revision as of 14:24, 20 February 2022
Frequently Used
- Template:Class fills table Classes from Form:Class and holds all current and previously offered classes
- Template:FacultyStaff fills table FacultyStaff from Form:FacultyStaff and holds current/former faculty
How to
#cargo_declare
defines the CARGO TABLE and the headers therein in the form of FIELD(TABLEHEADER)=DATATYPE. There can be no spaces or punctuation in these field names.
{{#cargo_declare:_table=Classes|Name=Page|Department=Page|Teacher=Page|Sessions=Integer (allowed values=1,2,3)}}
#cargo_store
adds the following to the table. The field names MUST MATCH those in the #cargo_declare call elsewhere in the template.
{{#cargo_store:_table=Classes|Name={{{Name|}}}}}
The Infobox template is also case-sensitive, so the following works:
{{Infobox class |name = {{#if:{{{Name|}}}|{{{Name|}}}}} }}
To Summarize:
Field | Data |
Name | Page |
Name | {{{Name|}}} |
name | {{{Name|}}} |
To Update
Template:DeptClasses <includeonly>{{class|offered{{=}}Yes, department{{=}}'{{PAGENAME}}'|coursename}} [[Category:Departments]]</includeonly> Template:STEM, etc (Houses) For full list of required classes, see {{STEMLogo}}. {{class|ST{{=}}y, grcode!{{=}}EL, offered{{=}}Yes}} {{class|grcode{{=}}EL, offered{{=}}Yes}} Template:MA1, etc (GRCodes) {{class|grcode{{=}}{{PAGENAME}}|coursename}}
OR
<repeat table="Courses" criteria="grcode={{PAGENAME}}"> <h3 style="display:inline;">[[{{{coursename}}}]]</h3> <p style="float:right;>{{{teacher}}}</p> {{{description}}} <p style="margin-left:1em;">{{{requiredby}}}</p> </repeat>
Subject Pages/Department Pages Category:Departments 'There should be a distinction between disciplines and departments'
- Computer and Information Sciences in Science
- Electives N/A
- English Language and Literature English
- Fine and Performing Arts Fine Arts
- Foreign Language and Literature Modern Languages
- Language Arts English
- Mathematics Mathematics
- Physical, Health and Safety Education Fine Arts
- Science Science
- Social Sciences and History History