Difference between revisions of "Template:LogList"
From Masq
m |
|||
| Line 1: | Line 1: | ||
| − | <includeonly>{{#vardefine: | + | <includeonly>{{#fornumargs: startkey |
| + | |startvalue | ||
| + | |{{#vardefine:key|{{#explode:{{#var:startvalue}}|~|0}}}}{{#vardefine:value|{{#explode:{{#var:startvalue}}|~|1}}}} | ||
| + | {{#switch: {{#var: key }} | ||
| + | | the_log= | ||
| + | {{#vardefine: plain_name | {{#sub:{{#var: value}}|2|-2}} }} | ||
| + | {{#vardefine: the_title|None.}} | ||
| + | {{#vardefine: the_desc|None.}} | ||
| + | | my_title= | ||
| + | {{#vardefine: the_title|{{#var:value}}}} | ||
| + | | description= | ||
| + | {{#vardefine: the_desc|{{#var:value}}}} | ||
{{ #dpl: | {{ #dpl: | ||
| namespace= | | namespace= | ||
| Line 6: | Line 17: | ||
| category=Log | | category=Log | ||
| include={log}:rl_date | | include={log}:rl_date | ||
| − | | format= ,,: [[%PAGE%|{{{ | + | | format= ,,: [[%PAGE%|{{#ifeq:{{#var:the_title}}|None.|%TITLE%|{{#var:the_title}}}}]]<br />,<div style="padding-left: 2.75em; margin-top:-.5em; font-style:italic;">\n{{#var:the_desc}}\n</div> |
| secseparators= | | secseparators= | ||
| noresultsheader=Nothing to see here. | | noresultsheader=Nothing to see here. | ||
| − | }}{{#vardefine:logLevel|Adv}}</includeonly><noinclude>== Usage == | + | }} |
| + | }} | ||
| + | }}{{#vardefine:logLevel|Adv}} | ||
| + | </includeonly><noinclude>== Usage == | ||
<pre> | <pre> | ||
{{LogList | {{LogList | ||
Revision as of 04:36, 12 February 2013
Usage
{{LogList
|the_log=Link to page name
|my_title=Title you'd prefer to use, if not the default
|description=Your description of the scene.
}}
This is a helper template to format AdvLog pages.
Examples
{{LogList
|the_log=[[Jai - Fork In The Road]]
|description=In which Petra presents Jai with a decent proposal, for a change.
}}
The basic use, giving you:
If you're fine with the default title, leave the 'my_title' line out entirely.
{{LogList
|the_log=[[Jai - Fork In The Road]]
|my_title=This Is The Title I Prefer
|description=In which Petra presents Jai with a decent proposal, for a change.
}}
Including it is the second option, giving you:
You'll need to paste a separate instance of this template into your AdvLog page for each log you want in your formatted list.