Template:Article: Difference between revisions

From MoHA Wiki
No edit summary
No edit summary
Line 3: Line 3:
{{#set:
{{#set:
|Associated Program={{{Program|}}}
|Associated Program={{{Program|}}}
|Associated Event={{{Event|}}}
|Date Published={{{Date Published|}}}
|Article author={{{Article authors|}}}|+sep=;
}}
}}
{{#ifexist: Widget:{{{Program|}}}|{{Styled category|{{{Program|}}}}}}}
{{#ifexist: Widget:{{{Program|}}}|{{Styled category|{{{Program|}}}}}}}
{{#ifeq: {{{Is published|}}}|Yes|[[Category:Published articles]]|[[Category:Unpublished articles]]}}
{{#ifeq: {{{Is published|}}}|Yes|[[Category:Published articles]]|[[Category:Unpublished articles]]}}
{{#arraymap:{{{Categories|}}}|;|@@@|[[Category:@@@]]{{#set: Additional category=@@@}}|}}
{{#arraymap:{{{Categories|}}}|;|@@@|[[Category:@@@]]{{#set: Additional category=@@@}}|}}
{{#arraydefine: authors|{{{Article authors|}}}|;}}
{{#arrayslice: authors_delimited
  |authors
  |0
  |{{#switch: {{#arraysize: authors}}
    |0=
    |1=1
    |#default={{#expr: {{#arraysize: authors}} - 1}}
  }}
}}
{{#arrayslice: authors_last
  |authors
  |-1
  |1
}}
</div>
<div id="article-info" class="d-flex flex-column flex-lg-row justify-content-between">{{#switch: {{#arraysize: authors}}
  |0=
  |#default=<span>By {{#arrayprint: authors_delimited|,&#32;}} {{#ifexpr: 0{{#arraysize: authors}} > 1|and {{#arrayprint: authors_last}}}}</span>
}}{{#if: {{{Date Published|}}}
  |<span>Published: {{#time: F j, Y|{{{Date Published|}}}}}</span>
</div>
</div>
</includeonly>
</includeonly>

Revision as of 20:20, March 27, 2024