Difference between revisions of "Template:CPT"

From blackwiki
Jump to navigation Jump to search
imported>Trinaliv
(Translated from the corresponding Portuguese template, see its history for attribution.)
 
imported>Trinaliv
m (transl.)
Line 1: Line 1:
{{#ifeq:{{{b|}}}|{{{b|-}}}|[[Ficheiro:{{#ifeq:{{{b}}}||{{#switch: {{uc:{{{1}}}}}
+
{{#ifeq:{{{b|}}}|{{{b|-}}}|[[File:{{#ifeq:{{{b}}}||{{#switch: {{uc:{{{1}}}}}
 
  | ABT = 23Flag(diagonalGyronny8)BY.svg
 
  | ABT = 23Flag(diagonalGyronny8)BY.svg
 
  | AGD = 23Flag(diagonalGyronny8)YV.svg
 
  | AGD = 23Flag(diagonalGyronny8)YV.svg

Revision as of 20:38, 21 May 2019

 [[{{{1}}}|{{{1}}}]] 

Template documentation[view] [edit] [history] [purge]

Usage

Creates an icon to identify a municipality in Portugal, using the municipal code (full list see Portuguese version of this list).

Examples:

  • "{{CPT|GRD}}" creates "GRD"
  • "{{CPT|fun}}" creates "FUN"
  • "{{CPT|mmn||sem_estilo}}" creates "MMN"

Behaves like Template:Colorbox if the code is not valid:

  • "{{CPT|CDFT|Cedofeita}}" creates "CDFT"
  • "{{CPT|XPTO}}" creates "XPTO"

With flag

If b is used, a simplified municipal flag will be dispayed:

  • "{{CPT|LSB|b=}}" creates "bandeiraLSB" (simplified)
  • "{{CPT|FAR|b=Pt-far1.png}}" creates "bandeiraFAR" (specified image)
  • "{{CPT|PLRG|Pelariga|b=Bandeira de Pelariga.jpg}}" creates "bandeiraPLRG" (municipal code not valid)
    • "{{CPT|XPTO||b=}}" creates "bandeiraXPTO"
  • "{{CPT|fig||sem_estilo|b=}}" creates "bandeiraFIG"