User:Mathglot/sandbox/Templates/Alberta templates/Cpmrowifb/doc
This is a documentation subpage for User:Mathglot/sandbox/Templates/Alberta templates/Cpmrowifb. It may contain usage information, categories and other content that is not part of the original user template page. |
Governs conditional row display: given a display parameter, returns '1' if a row should be emitted for this municipality type, otherwise empty.
Usage
[edit]{{Draft:cpmrowifb|type=Town|disp=towns}}
– returns Draft:Cpmrowifb, indicating the town row should be displayed
{{Draft:cpmrowifb|type=Village|disp=urban}}
– returns Draft:Cpmrowifb, indicating the Village row should be displayed
{{Draft:cpmrowifb|type=Metis settlement|disp=urban}}
– returns Draft:Cpmrowifb (empty), indicating the Village row should not be displayed
Parameters
[edit]|type=
– municipality status, e.g., 'City', 'Town', 'Village', etc. See valid values for positional param 2 (alias: |t=
)
|disp=
– controls conditional display of a row depending on its type
. For example, for |disp=cities
(or |disp=c
) the row is only displayed if its type
is 'City'. Possible values for |disp=
:
cities
orc
– displays a given row, only if it has type 'City'towns
ort
– if type = 'Town'villages
orv
– if type = 'Village'summer villages
orsv
– if type = 'Summer village'specialized municipalities
orsm
– if type = 'Specialized municipality'municipal districts
ormd
– if type = 'Municipal district'improvement districts
orid
– if type = 'Improvement district'special areas
orsa
– if type = 'Special area'Metis settlements
orms
– if type = 'Metis settlement'urban
– if type is is any of 'City', 'Town', 'Village' or 'Summer village'rural
– if|type=
is any of 'Municipal district', 'Improvement districts', or 'Special area'.
Examples
[edit]{{#if: {{cpmrowifb|type=City|disp=cities}} | ''row'' | }}
– the City row should be displayed.
{{#if: {{cpmrowifb|type=Village|disp=cities}} | ''row'' | }}
– the Village row should not be displayed in a cities table.
{{#if: {{cpmrowifb|type=City|disp=villages}} | ''row'' | }}
– the City row should not be displayed in a villages table.
See also
[edit]