From GamingWiki
Line 4: | Line 4: | ||
# ordinal | # ordinal | ||
# blurb | # blurb | ||
+ | # label | ||
{{Campaign timeline intro}} | {{Campaign timeline intro}} | ||
Line 9: | Line 10: | ||
-->{{#hashdefine: userParams | {{{userparam|}}} }}<!-- | -->{{#hashdefine: userParams | {{{userparam|}}} }}<!-- | ||
+ | |||
+ | -->{{#vardefine: expandbook | {{#hashvalue: userParams | expandbook}} }}<!-- | ||
+ | |||
+ | We can optionally specify different labels | ||
+ | -->{{#vardefine: booklabel | {{#hashvalue: userParams | booklabel}} }}<!-- | ||
+ | -->{{#vardefine: chapterlabel | {{#hashvalue: userParams | chapterlabel}} }}<!-- | ||
-->{{Campaign timeline bookline | -->{{Campaign timeline bookline | ||
− | | label = {{#if:{{{5|}}}|{{{5}}}|Book}} | + | | label = {{#if:{{{5|}}}|{{{5}}}|{{#var:booklabel|Book}}}} |
| ordinal = {{{3}}} | | ordinal = {{{3}}} | ||
| title = {{{2}}} | | title = {{{2}}} | ||
Line 18: | Line 25: | ||
-->{{#if: <!-- | -->{{#if: <!-- | ||
− | + | If the current "expandbook" is set to the current book number | |
− | --> | + | -->{{#ifeq: {{#var:expandbook|latest}}| {{{3|M_NUL}}} | 1 }}}}<!-- |
− | + | or we are told to expand all books | |
− | -->{{#ifeq:{{# | + | -->{{#ifeq:{{#var:expandbook}}| all | 1 }}<!-- |
-->|<!-- | -->|<!-- | ||
Run a subquery on the book's chapters | Run a subquery on the book's chapters | ||
Line 33: | Line 40: | ||
| format = template | | format = template | ||
| template = SMW campaign chapter | | template = SMW campaign chapter | ||
+ | | userparam = {{{userparam|}}} | ||
}}}}<!-- | }}}}<!-- | ||
-->|<!-- | -->|<!-- |
Revision as of 15:17, 11 April 2014
Positional parameters for this template are:
- page
- title
- ordinal
- blurb
- label
Campaign Timeline | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Book {{{3}}}: [[{{{1}}}|{{{2}}}]] | ||||||||||
?title | ?ordinal | ?blurb | ?label | sort = ordinal | link = none | format = template | template = SMW campaign chapter | userparam =
}}|}}
|