Battlestar Wiki:Episode parser: Difference between revisions
From Battlestar Wiki, the free, open content Battlestar Galactica encyclopedia and episode guide
More actions
New page: {{Project|Episode Parser}} The '''episode parser''' allows quick rendering of links to episodes in any specified format. The parser can be placed inside templates or can be used alone. Th... |
|||
Line 30: | Line 30: | ||
| Output | | Output | ||
|- | |- | ||
| <code><nowiki>{{#episode: | | <code><nowiki>{{#episode:props:%episode%|101,102,110}}</nowiki></code> | ||
| {{#episode: | | {{#episode:props:%episode%|101,102,110}} | ||
|- | |- | ||
| <code><nowiki>{{#episode: | | <code><nowiki>{{#episode:props:%episode%|101,102,110|TOS}}</nowiki></code> | ||
| {{#episode: | | {{#episode:props:%episode%|101,102,110|TOS}} | ||
|} | |} |
Revision as of 16:02, 31 July 2008
| |||||
The episode parser allows quick rendering of links to episodes in any specified format. The parser can be placed inside templates or can be used alone. The production number(s) is how we generate the links. If a invalid number is inputted, it will just go onto the next one. As of right now, it only works on "English" title names.
Syntax
Using the parser: "#episode"
Full Syntax: {{#episode|format|production number(s)|series|link|before|after}}
Required
- format: Must include %episode% at least once.
- production numbers: The production numbers of the episodes. You can get the list from here.
Optional
- series: The series. eg.
TOS, 1980, RDM, Caprica
.RDM
is default.
- link
- true: Will always make it a link (Default)
- or false: If you are trying to create a Category inclusion (
{{#episode:Category: ... }}
) or Internalization inclusion ({{#episode:en: ... }}
) set this to false. Otherwise it will make a link to this wiki.
- before: What to render before the link. (Default: empty)
- after: What to render after the link. (Default:
<br />
)- Note: Will not happen after the last item.
- Note: To remove the default code, you would have to keep the field blank.
Examples
Example | Output |
{{#episode:props:%episode%|101,102,110}}
|
101,102,110}} |
{{#episode:props:%episode%|101,102,110|TOS}}
|
101,102,110|TOS}} |