Template:Notes2

From Notes
Jump to navigation Jump to search

Template for header on sequential notes pages (upgraded version of Template:Notes1)


Quick Start

Copy, paste, and modify:

{{Notes2
| class = MARB 403-252
| type  = Lecture
| num   = 10
| date  = 2013-01-12
}}

Or use the compact syntax:

{{Notes2 | MARB 403-252 | Lecture | 10
| date = 2013-01-12
}}


Required Parameters

Parameter Type Description
class 1 string Full class name, automatically converted to UPPERCASE (e.g. MARB 403-252)
type 2 string The type of material, automatically Capitalized (e.g. Lecture, Lab, Chapter)
num 3 integer The sequential ordering for the current page


Optional Parameters

Predefined values:

  • className is defined by the first part of class up to the first '-'
  • padNum is the zero-padded version of num with length defined by pad parameter
Parameter Type Default Value Description
date date (last edit date) The date on which the notes were taken. Although optional, this parameter is recommended
sort string {type} {num} The sort key for the category
pad integer 2 The zero-padding length for sequential ordering
last boolean false The template can auto-detect "first", but needs a stopping point.
next string {className} {type} {num + 1} Customize the "next" link
prev string {className} {type} {num - 1} Customize the "previous" link
exam integer string NULL Categorize under {className} Exam {exam[0]}, use {exam[1]} flag text if set
examSort string {type} {num} The sort key for the exam category (if exam is specified)
slides string NULL NULL omit slides link flag
auto or true {className} {type} Slides {num}.pdf
starts with @ Specify exact upload link of file (everything after @ will be used)
(anything else) {className} {type} Slides {slides}


Sample Usage and Output

Typing

{{Notes2
| class  = MARB 403-252
| type   = Lecture
| num    = 3
| exam   = 2 start
| date   = 2012-01-06
| slides = 2a.pdf
}}

Is equivalent to the following MediaWiki code

[[Category:Notes|MARB 403-252 Lecture 03]]
[[Category:MARB 403-252|Lecture 03]]
[[Category:MARB 403 Exam 1|Lecture 03]]

[[MARB 403 Lecture 2|« previous]] | ''Sunday, January 6, 2013'' | [[MARB 403 Lecture 4|next »]]
{{Flag|Begin [[:Category:MARB 403 Exam 1|Exam 1]] content}}
{{Flag|[[Media:MARB 403 Lecture Slides 2a.pdf|Lecture Slides]]}}

And results in a header like the following:

« previous | Sunday, January 6, 2013 | next »

Begin Exam 1 content