Template:Files: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 18: Line 18:
{{#tag:gallery
{{#tag:gallery
|{{#arraymap:{{{files|}}}; {{{file|}}}|;|xx|{{#switch:{{#explode:xx|.|-1}}
|{{#arraymap:{{{files|}}}; {{{file|}}}|;|xx|{{#switch:{{#explode:xx|.|-1}}
|docx = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|File:Microsoft_Office_Word_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}} }}
|docx = File:Microsoft_Office_Word_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}}
|doc = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|File:Microsoft_Office_Word_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}} }}
|doc = File:Microsoft_Office_Word_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}}
|pptx = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|File:Microsoft_Office_PowerPoint_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}} }}
|pptx = File:Microsoft_Office_PowerPoint_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}}
|ppt = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|File:Microsoft_Office_PowerPoint_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}} }}
|ppt = File:Microsoft_Office_PowerPoint_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}}
|xls = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|File:Microsoft_Office_Excel_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}} }}
|xls = File:Microsoft_Office_Excel_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}}
|xlsx = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|File:Microsoft_Office_Excel_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}} }}
|xlsx = File:Microsoft_Office_Excel_(2019–present).svg{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}}
|#default = File:xx{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}}
|#default = File:xx{{!}}{{#explode:xx|.|0}}{{!}}link={{filepath:xx}}
}}|\n\n}} }}<div class="d-none"><!-- embed files, you know for search -->{{#arraymap:{{{files|}}}; {{{file|}}}|;|xx|{{#switch:{{#explode:xx|.|-1}}
}}|\n\n}} }}<div class="d-none"><!-- embed files, you know for search -->{{#arraymap:{{{files|}}}; {{{file|}}}|;|xx|{{#switch:{{#explode:xx|.|-1}}
Line 35: Line 35:
}}|}}</div>
}}|}}</div>
|{{#switch:{{#explode:{{{files|}}}|.|-1}}
|{{#switch:{{#explode:{{{files|}}}|.|-1}}
|docx = [[File:Microsoft_Office_Word_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|docx = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|[[File:Microsoft_Office_Word_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]}}<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|doc = [[File:Microsoft_Office_Word_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|doc = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|[[File:Microsoft_Office_Word_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]}}<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|pptx = [[File:Microsoft_Office_PowerPoint_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|pptx = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|[[File:Microsoft_Office_PowerPoint_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]}}<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|ppt = [[File:Microsoft_Office_PowerPoint_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|ppt = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|[[File:Microsoft_Office_PowerPoint_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]}}<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|xls = [[File:Microsoft_Office_Excel_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|xls = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|[[File:Microsoft_Office_Excel_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]}}<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|xlsx = [[File:Microsoft_Office_Excel_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|xlsx = {{#ifexists:Template:ExternalOfficeRenderer|{{ExternalOfficeRenderer|path=xx}}|[[File:Microsoft_Office_Excel_(2019–present).svg|center|thumb|200px|link={{filepath:{{{files|}}}}}|{{{files|}}}]]}}<span class="d-none">[[file:{{{files|}}}|thumb|class=d-none]]</span>
|#default = [[file:{{{files|}}}|650px|thumb|center|{{{files|}}} [[media:{{{files|}}}|{{:mediawiki:download}}]] ]]
|#default = [[file:{{{files|}}}|650px|thumb|center|{{{files|}}} [[media:{{{files|}}}|{{:mediawiki:download}}]] ]]
}}
}}

Revision as of 13:24, 8 April 2022

A template for rendering files into view switching between galleries and other view in closed knowledge portals.

Simple file

{{Files|files=JustLogo.svg}}


JustLogo.svg download

Multiple files

{{Files|files=JustLogo.svg;Fox on shelf.jpg}}


Office files

{{Files|files=על המערכת.docx}}


{{#ifexists:Template:ExternalOfficeRenderer|

|

File:Microsoft Office Word (2019–present).svg
על המערכת.docx

}}File:על המערכת.docx



A template for rendering files into view switching between galleries and other view.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
List of Files namefiles

no description

Filerequired
filefile

no description

Unknownoptional