Template:Infobox film/short description: Difference between revisions

From The Goon Show Depository
en>Jonesey95
(add secondary check to see if the "released" code and the "country" code actually return values in order to decided whether to capitalize "film" in the short description. It should be capitalized when it is on its own. This would probably work better in Lua.)
 
m (1 revision imported)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#if:{{Has short description}}
{{#if:{{Has short description}}
|<!--Do nothing-->
|<!--Do nothing-->
|{{short description|1=<!--return year and nationality for most articles-->{{#if:{{{released|}}}|{{#invoke:String|match|{{{released}}}|%d%d%d%d?|match=1|nomatch=}}}} {{#if:{{{country|}}}|{{Country2nationality|{{#invoke:String2 |split |txt={{{country|}}} |sep=[<{;] |plain=false}}}}}} <!--Test to see if released returns a year and country returns a nationality to decide whether to capitalize "film"-->{{#if:{{#if:{{{released|}}}|{{#invoke:String|match|{{{released|}}}|%d%d%d%d?|match=1|nomatch=}}}}{{Country2nationality|{{#invoke:String2 |split |txt={{{country|}}} |sep=[<{;] |plain=false}}}}|film|Film}}  
|{{short description|1=<!--return year and nationality for most articles-->{{#if:{{{released|}}}|{{#invoke:String|match|{{{released}}}|%d%d%d%d?|match=1|nomatch=}}}} {{#if:{{{country|}}}|{{Country2nationality|{{#invoke:String2 |split |txt={{KillMarkers|{{{country|}}}}} |sep=[<{;] |plain=false}}}}}} <!--Test to see if released returns a year and country returns a nationality to decide whether to capitalize "film"-->{{#if:{{#if:{{{released|}}}|{{#invoke:String|match|{{{released|}}}|%d%d%d%d?|match=1|nomatch=}}}}{{Country2nationality|{{#invoke:String2 |split |txt={{KillMarkers|{{{country|}}}}} |sep=[<{;] |plain=false}}}}|film|Film}}  
<!--close short description template-->}}
<!--close short description template-->}}
<!--close first if statement -->}}<noinclude><!--
<!--close first if statement -->}}<noinclude><!--
Line 7: Line 7:
Text above is essentially {{short description| <year> <country> film}}
Text above is essentially {{short description| <year> <country> film}}
-->
-->
{{documentation|content=
{{documentation}}
This template is used for generating a short description for {{t|infobox film}}.
</noinclude>
 
{{Film- and television-related infobox templates}}}}</noinclude>

Latest revision as of 11:12, 2 September 2024