Template:F/layout: Difference between revisions
Template page
More actions
first version |
m necessary diversification |
||
| Line 1: | Line 1: | ||
<includeonly>{{#switch:Z|{{{2}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8|}}}=<!-- | <includeonly>{{#switch:Z|{{{2}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8|}}}=<!-- | ||
-->|{{#if:{{{Y|}}}|{{#switch:{{{3|}}}<!-- | -->|{{#if:{{{Y|}}}|{{#switch:{{{3|}}}<!-- | ||
-->|c={{#invoke:File|pageCount|file= | -->|c={{#invoke:File|pageCount|file={{{1}}}}}<!-- | ||
-->|d={{#invoke:File|dateWorkCreated|file= | -->|d={{#invoke:File|dateWorkCreated|file={{{1}}}}}<!-- | ||
-->|f={{Validextension | -->|f={{Validextension|{{{1}}}|{{#invoke:File|woExtension|file={{{1}}}}}}}<!-- | ||
-->|x={{Validextension | -->|x={{Validextension|{{{1}}}|{{#invoke:File|woExtension|file={{{1}}}}}|ext}}<!-- | ||
-->|u={{#if:{{Validextension | -->|u={{#if:{{Validextension|{{{1}}}|{{#invoke:File|woExtension|file={{{1}}}}}|ext}}<!-- | ||
-->|{{#invoke:File|csExtension|file= | -->|{{#invoke:File|csExtension|file={{{1}}}}}|{{{2|png}}}}}<!-- return extension as-it-is, or "png"<!-- | ||
-->|g={{#ifeq:{{{2}}}|-<!-- | -->|g={{#ifeq:{{{2}}}|-<!-- | ||
-->|{{#tag:gallery | -->|{{#tag:gallery|{{{1}}}{{!}}{{#switch:{{{Y}}} | ||
|1=<center>File: | |1=<center>File:{{{1}}}</center><!-- {{F|filename|-|G|px}} with centering --> | ||
|2=File: | |2=File:{{{1}}}}}<!-- {{F|filename|G|-|px}} without centering --> | ||
|widths={{#if:{{{4|}}}|{{#invoke:Galeria|converse|{{{4}}}|w}}|120}}<!-- | |widths={{#if:{{{4|}}}|{{#invoke:Galeria|converse|{{{4}}}|w}}|120}}<!-- | ||
-->|heights={{#if:{{{4|}}}|{{#invoke:Galeria|converse|{{{4}}}|h}}|120}} | -->|heights={{#if:{{{4|}}}|{{#invoke:Galeria|converse|{{{4}}}|h}}|120}} | ||
}} | }} | ||
|{{#tag:gallery | |{{#tag:gallery|{{{1}}}{{!}}{{#switch:{{{Y}}} | ||
|1=<center>{{{2|}}}</center><!-- | |1=<center>{{{2|}}}</center><!-- {{F|filename|caption|G|px}} with centering --> | ||
|2={{{2|}}}<!-- | |2={{{2|}}}<!-- {{F|filename|G|caption|px}} without centering --> | ||
|5=<center>{ | |5=<center>{{{5|}}}</center>}}<!-- {{F|filename|G|px}} with centering 5 --> | ||
|widths={{#if:{{{4|}}}|{{#invoke:Galeria|converse|{{{4}}}|w}}|120}}<!-- | |widths={{#if:{{{4|}}}|{{#invoke:Galeria|converse|{{{4}}}|w}}|120}}<!-- | ||
-->|heights={{#if:{{{4|}}}|{{#invoke:Galeria|converse|{{{4}}}|h}}|120}} | -->|heights={{#if:{{{4|}}}|{{#invoke:Galeria|converse|{{{4}}}|h}}|120}} | ||
}}}}<!-- end 'g' | }}}}<!-- end 'g' | ||
-->|i={{#invoke:File|fileExistsRelaxed|file= | -->|i={{#invoke:File|fileExistsRelaxed|file={{{1}}}}}<!-- | ||
-->|s={{#invoke:File|size|file= | -->|s={{#invoke:File|size|file={{{1}}}}}<!-- | ||
-->|h={{#invoke:File|height|file= | -->|h={{#invoke:File|height|file={{{1}}}}}<!-- | ||
-->|w={{#invoke:File|width|file= | -->|w={{#invoke:File|width|file={{{1}}}}}<!-- | ||
-->|v={{#invoke:File|valid|file= | -->|v={{#invoke:File|valid|file={{{1}}}}}<!-- | ||
-->|p={{PAGESIZE:File: | -->|p={{PAGESIZE:File:{{{1}}}}}<!-- | ||
-->|n={{#switch:{{{2|}}}|n|b|l|r|+|-|={{#if:{{{1|}}}|{{ | -->|n={{#switch:{{{2|}}}|n|b|l|r|+|-|={{#if:{{{1|}}}|{{PAGENAME:{{{1}}}<!-- | ||
-->|<span style="font-weight:900;background:#FF8"> no name </span>}}|{{{2}}}}}}}<!-- | -->|<span style="font-weight:900;background:#FF8"> no name </span>}}|{{{2}}}}}}}<!-- | ||
| Line 35: | Line 35: | ||
-->{{#switch:+|{{{2}}}|{{{3}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8|}}}=File:<!-- | -->{{#switch:+|{{{2}}}|{{{3}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8|}}}=File:<!-- | ||
-->|{{#switch:-|{{{2}}}|{{{3}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8|}}}=File:}}}}<!-- | -->|{{#switch:-|{{{2}}}|{{{3}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8|}}}=File:}}}}<!-- | ||
-->{{#switch:{{{2|}}}|n|b|l|r|+|-|={{#if:{{{1|}}}|{{ | -->{{#switch:{{{2|}}}|n|b|l|r|+|-|={{#if:{{{1|}}}|{{PAGENAME:{{{1}}}<!-- | ||
-->|<span style="font-weight:900;background:#FF8"> no name </span>}}|{{{2}}}}}<!-- | -->|<span style="font-weight:900;background:#FF8"> no name </span>}}|{{{2}}}}}<!-- | ||
| Line 48: | Line 48: | ||
-->|S={{#invoke:File|size|file={{PAGENAME}}}}<!-- | -->|S={{#invoke:File|size|file={{PAGENAME}}}}<!-- | ||
-->}}|<!-- | -->}}|<!-- | ||
-->[[:{{#if:{{{l|}}}|{{{l}}}:}}File: | -->[[:{{#if:{{{l|}}}|{{{l}}}:}}File:{{{1}}}<!-- | ||
-->|{{#switch:+|{{{2}}}|{{{3}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8|}}}=File:}}<!-- | -->|{{#switch:+|{{{2}}}|{{{3}}}|{{{4}}}|{{{5}}}|{{{6}}}|{{{7}}}|{{{8|}}}=File:}}<!-- | ||
-->{{#switch:{{{2|}}}|b|l|r|+|-|= | -->{{#switch:{{{2|}}}|b|l|r|+|-|={{{1}}}|{{{2}}}}}]]<!-- | ||
-->{{#if:{{{l|}}}|</span>}} }}<!--fxus | -->{{#if:{{{l|}}}|</span>}} }}<!--fxus | ||
-->|<span style="font-weight:900;background:#FF8;color:#F00"> ''no name<!-- | -->|<span style="font-weight:900;background:#FF8;color:#F00"> ''no name<!-- | ||
Revision as of 17:01, 7 February 2020
Subtemplate to {{F}}, invoked from either of 6 positions but only once
- performs display of the file name (2nd name as given, without PAGENAME:)
- Parameters: 1, 2, 3, 4, 5, 6, 7, 8; l; internal: Y
- When parameter 1 is missing, categorizing to Commons:Missing file name in template F occurs
Special function: just parameter 1 is F,X,U,S: like File Function Letter for {{PAGENAME}}