Template:Article: Difference between revisions

From MoHA Wiki
(Created page with "<includeonly> <div class="d-none" hidden> {{#set: |Associated Program={{{Programs|}}}|+sep=; }} {{#ifeq: {{{Is published|}}}|Yes|Category:Articles|Category:Unpublished articles}} {{#arraymap:{{{Categories|}}}|;|@@@|Category:@@@|}} </div> </includeonly>")
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 2: Line 2:
<div class="d-none" hidden>
<div class="d-none" hidden>
{{#set:
{{#set:
|Associated Program={{{Programs|}}}|+sep=;
|Associated Program={{{Program|}}}
|Associated Event={{{Event|}}}
|Date Published={{{Date Published|}}}
|Article author={{{Article authors|}}}|+sep=;
}}
}}
{{#ifeq: {{{Is published|}}}|Yes|[[Category:Articles]]|[[Category:Unpublished articles]]}}
{{#ifexist: Widget:{{{Program|}}}|{{Styled category|{{{Program|}}}}}}}
{{#arraymap:{{{Categories|}}}|;|@@@|[[Category:@@@]]|}}
{{#ifeq: {{{Is published|}}}|Yes|[[Category:Published articles]]|[[Category:Unpublished articles]]}}
{{#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: {{{Event|}}}
    |<span>[[{{{Event|}}}]]</span>
  }}<!--
 
-->{{#if: {{{Date Published|}}}
    |<span>Published: {{#time: F j, Y|{{{Date Published|}}}}}</span>
  }}
</div>
</div>
</includeonly>
</includeonly>

Latest revision as of 20:32, March 27, 2024