Difference between revisions of "Template:LogList"
From Masq
m |
m |
||
| Line 1: | Line 1: | ||
<includeonly>{{#vardefine: the_date|{{#ifeq:{{uc:{{{date_style}}}}}|RL|RL|IC}}}} | <includeonly>{{#vardefine: the_date|{{#ifeq:{{uc:{{{date_style}}}}}|RL|RL|IC}}}} | ||
| − | {{#ifeq:{{{explain_date}}}|yes|<center>''-=Dates are {{#var:the_date}}=-''</center>|}}{{#fornumargs: startkey | + | {{#ifeq:{{{explain_date}}}|yes|<center>''-= Dates are {{#var:the_date}} =-''</center>|}}{{#fornumargs: startkey |
|startvalue | |startvalue | ||
|{{#vardefine:key|{{#explode:{{#var:startvalue}}|~|0}}}}{{#vardefine:value|{{#explode:{{#var:startvalue}}|~|1}}}} | |{{#vardefine:key|{{#explode:{{#var:startvalue}}|~|0}}}}{{#vardefine:value|{{#explode:{{#var:startvalue}}|~|1}}}} | ||
Revision as of 05:42, 12 February 2013
Usage
{{LogList
|date_style=RL/IC
|explain_date=yes/no
|-------------------
|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 - Sugar Lumps]]
|description~When you party with the party prince, you get two complimentary after-dinner mints.
|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:
| 01/23/2008: Sugar Lumps When you party with the party prince, you get two complimentary after-dinner mints. |
| 09/12/2009: Fork In The Road In which Petra presents Jai with a decent proposal, for a change. |
The optional elements include 'my_title', which should be inserted only for each log whose title you want to change on your page, and two special options above the line, 'date_style' and 'explain_date'.
{{LogList
|date_style=RL
|explain_date=yes
|-------------------
|the_log~[[Jai - Sugar Lumps]]
|description~When you party with the party prince, you get two complimentary after-dinner mints.
|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.
}}
| 10/21/2010: Sugar Lumps When you party with the party prince, you get two complimentary after-dinner mints. |
| 11/23/2011: This Is The Title I Prefer In which Petra presents Jai with a decent proposal, for a change. |
This template is slightly trickier to use than most.
- You only need one instance of this template in your AdvLog page.
- Each log in your list takes a "the_log", a optional "my_title", and a "description".
- They need to be in order (the_log, my_title if used, description) and please note that the repeated parameters are set off by a ~, not a =. If you don't do it this way, it won't work!
- Using a ~ in any of your log names/titles/description will also not work as expected.
- The optional parameters above the dashed line DO use an equals sign, however.
- If you leave out these parameters, the default behaviour is to use IC dates and not give the date explanation line.
If you find yourself confused, check (but don't change) Jai/AdvLog, where you can see this in use.