Template:DailyForecastLogRow: Difference between revisions

From Ephinea PSO Wiki
(Changed time field to date; Changed decision structure to #switch to prevent excess logging)
(Undo)
Tag: Undo
Line 1: Line 1:
|-
|-
|{{#switch:{{{1|}}}
|{{#ifeq:{{{1}}}|time|{{subst:<noinclude/>#time:j F Y}}{{!}}{{!}}|}}|{{{job|}}}||{{{race|}}}||{{{sex|}}}<noinclude>
|time=|{{subst:<noinclude/>#time:j F Y}}{{!}}{{!}}|}}|{{{job|}}}||{{{race|}}}||{{{sex|}}}
|#default=|{{{job|}}}||{{{race|}}}||{{{sex|}}}<noinclude>
==Usage==
==Usage==
''This template must be substituted,''
''This template must be substituted,''
Line 21: Line 19:
{| class="wikitable" style="text-align: center;"
{| class="wikitable" style="text-align: center;"
! Profession !! Race !! Gender
! Profession !! Race !! Gender
|-
|-
|-
|{{#ifeq:{{{1}}}|time|1 January 2022{{!}}{{!}}|}}|Forces||Newmans||Males
|{{#ifeq:{{{1}}}|time|1 January 2022{{!}}{{!}}|}}|Forces||Newmans||Males
Line 34: Line 31:
{| class="wikitable sortable" style="text-align: center;"
{| class="wikitable sortable" style="text-align: center;"
! Date !! class="unsortable" | Profession !! class="unsortable" | Race !! class="unsortable" | Gender
! Date !! class="unsortable" | Profession !! class="unsortable" | Race !! class="unsortable" | Gender
|-
|-
|-
|{{#ifeq:time|time|1 January 2022{{!}}{{!}}|}}|||Droids||
|{{#ifeq:time|time|1 January 2022{{!}}{{!}}|}}|||Droids||
|}
|}
[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 19:34, 1 January 2022

|- ||||||

Usage

This template must be substituted,
with the intention of writing to the page source table directly and, if the optional time field is used, print the at-time-of-submission day-month-year date properly.

Meant for simple insertion/replacement in the Daily Forecast log page, which will update the Main Page's Template:DailyForecast transclusion indirectly.
It is possible to omit fields other than time, but it is good practice to instead omit the field values if missing for today's forecast to prevent user-created errors.

Examples

{| class="wikitable" style="text-align: center;"
! Profession !! Race !! Gender
{{subst:DailyForecastLogRow|job=Forces|race=Newmans|sex=Males}}
|}
Profession Race Gender
Forces Newmans Males
{| class="wikitable sortable" style="text-align: center;"
! Date !! class="unsortable" | Profession !! class="unsortable" | Race !! class="unsortable" | Gender
{{subst:DailyForecastLogRow|job=|race=Droids|sex=|time}}
|}
Date Profession Race Gender
1 January 2022 Droids