Template:LocLine: Difference between revisions
(Build up a JSON object to store as a singular smw property) |
(Use Module:Location Table) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#invoke:Location Table|line}}</includeonly><noinclude>{{/doc}}</noinclude> |
|||
<includeonly><tr> |
|||
<td>[[{{{loc}}}]]</td> |
|||
<td>{{#show: {{{loc}}} |?Episode }}</td> |
|||
<td>{{#if:{{{quantity|}}}|{{{quantity}}}|{{Unknown}}}}</td> |
|||
</tr>{{#subobject:LOC_{{{loc}}}|Location object={{#if:{{#var:loc_version}}|{{FULLPAGENAME}}#{{#var:loc_version}}|{{FULLPAGENAME}}}}|Located in={{{loc}}}|Location quantity={{#if:{{{quantity|}}}|{{{quantity}}}|Unknown}}}}{{#vardefine:loc_json|{{#var:loc_json}}{{#if:{{#var:loc_json}}|,|{{(}}}}"{{{loc}}}":{{#if:{{{quantity|}}}|{{{quantity}}}|null}}}}</includeonly><noinclude>{{/doc}}</noinclude> |
Latest revision as of 16:35, 16 December 2024
Template documentation
This documentation is transcluded from Template:LocLine/doc. [edit] [history] [purge]
Template:LocLine invokes function line in Module:Location Table using Lua.
The LocLine templates are used to list an entity's locations. Three templates are used to form the locations table:
{{LocTableHead}}
- Contains table headers for the top of the locations table{{LocLine}}
- Template for all of the individual location lines{{LocTableBottom}}
- Contains table footers for the bottom of the locations table
Example
{{LocTableHead}} {{LocLine|loc=Apothecary|quantity=1}} {{LocTableBottom}}
gives:
Location | Episode | Quantity |
---|---|---|
Apothecary | Hopeport | 1 |
Parameter details
loc
The name of the location the entity is found.
quantity
The quantity of the entity found in the location.
Unfilled location lines for quick copy-paste
{{LocTableHead}} {{LocLine|location=|quantity=}} {{LocTableBottom}}