|
|
Line 1: |
Line 1: |
− | {{#if:{{{title|}}}|<!--
| + | <!-- |
− | -->{{#set: title = {{{title}}} }}<!--
| + | |
− | -->{{#vardefine: parent |<!--
| + | Pass this off to another template. First find out if this is a book or a chapter: |
− | -->{{#if: {{{parentordinal|}}} |<!--
| + | |
− | -->{{#ask: [[is a::book]] [[campaign::{{{campaign|Null}}}]] [[ordinal::{{{parentordinal}}}]] | ?= |link=none}}<!--
| + | -->{{#vardefine: parent |<!-- |
− | -->|<!--
| + | -->{{#if: {{{parentordinal|}}} |<!-- |
− | -->{{{parent|}}}<!--
| + | -->{{#ask: [[is a::book]] [[campaign::{{{campaign|Null}}}]] [[ordinal::{{{parentordinal}}}]] | ?= |link=none}}<!-- |
− | -->}}<!--
| + | -->|<!-- |
| + | -->{{{parent|}}}<!-- |
| -->}}<!-- | | -->}}<!-- |
− | -->{{#if: {{#var:parent}} <!--
| + | -->}}<!-- |
− | -->| {{#set: is a = chapter | parent = {{#var:parent}} }} <!--
| + | |
− | -->| {{#set: is a = book }} <!--
| + | -->{{#parameterstohash: paramsHash}}<!-- |
− | -->}}<!--
| + | |
− | -->{{#if: {{{campaign|}}} | [[Category: {{{campaign}}}]] <!--
| + | -->{{#hashtotemplate: <!-- |
− | -->{{#if: {{#var:parent}} <!--
| + | -->{{#if: {{#var:parent}} | Campaign chapter | Campaign book }}<!-- |
− | -->| {{#set: | chapter of = {{{campaign}}} }}<!--
| + | -->| paramsHash }}<!-- |
− | -->| {{#set: | book of = {{{campaign}}} }}<!--
| + | --> |
− | -->}}<!--
| |
− | -->}}<!--
| |
− | -->{{#if: {{{ordinal|}}} |{{#set: ordinal = {{{ordinal}}} }} }}<!-- | |
− | -->{{#if: {{{blurb|{{{content|}}}}}} |{{#set: blurb = {{{blurb|{{padright:|128|{{{content}}}}}...}}} }} }}<!--
| |
− | -->{{#if: {{{blurb|}}} |<nowiki />
| |
− | : ''{{{blurb}}}'' }}<!--
| |
− | -->{{#if:{{{content|}}} |{{#set: content = {{{content}}} }} <nowiki />
| |
− | {{{content}}} }}<!--
| |
− | -->}}
| |