Cargo and Page Forms: Difference between revisions

From TSAS Library
Jump to: navigation, search
(Created blank page)
 
No edit summary
Line 1: Line 1:
TO REPLICATE


HOW TO CARGO/PAGE FORMS
<pre>#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|}}}}}
}}</pre>
===To Update===
<pre>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}}
</pre>
Subjects/Departments under Category:Departments
* Computer and Information Sciences
* Elective
* English Language and Literature
* Fine and Performing Arts
* Foreign Language and Literature
* Language Arts
* Mathematics
* Physical, Health and Safety Education
* Science
* Social Sciences and History

Revision as of 16:01, 13 January 2022

TO REPLICATE


HOW TO CARGO/PAGE FORMS

#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 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}}


Subjects/Departments under Category:Departments

  • Computer and Information Sciences
  • Elective
  • English Language and Literature
  • Fine and Performing Arts
  • Foreign Language and Literature
  • Language Arts
  • Mathematics
  • Physical, Health and Safety Education
  • Science
  • Social Sciences and History