Template:Local/help: Difference between revisions

From OER in Education
No edit summary
No edit summary
Line 7: Line 7:
  |Sierra Leone=Sierra Leonean version
  |Sierra Leone=Sierra Leonean version
  |Uganda=Ugandan version
  |Uganda=Ugandan version
|Ghana=Ghanaian version
  }}
  }}
gives "
gives "
Line 16: Line 17:
|Sierra Leone=Sierra Leonean version
|Sierra Leone=Sierra Leonean version
|Uganda=Ugandan version
|Uganda=Ugandan version
|Ghana=Ghanaian version
}}", where on localised pages only the appropriate string appears, see [[Template:Local/help/rw]] and  [[Template:Local/help/zm]].
}}", where on localised pages only the appropriate string appears, see [[Template:Local/help/rw]] and  [[Template:Local/help/zm]].


Line 26: Line 28:
  |Sierra Leone=Sierra Leonean version
  |Sierra Leone=Sierra Leonean version
  |Uganda=Ugandan version
  |Uganda=Ugandan version
|Ghana=Ghanaian version
  |defaultonly=1
  |defaultonly=1
  }}
  }}
Line 36: Line 39:
|Sierra Leone=Sierra Leonean version
|Sierra Leone=Sierra Leonean version
|Uganda=Ugandan version
|Uganda=Ugandan version
|Ghana=Ghanaian version
|defaultonly=1
|defaultonly=1
}}
}}

Revision as of 13:14, 18 February 2015

Full version: Default and all countries

{{Local
|default=default text
|Zambia=Zambian version
|Kenya=Kenyan version
|Rwanda=Rwandan version
|Sierra Leone=Sierra Leonean version
|Uganda=Ugandan version
|Ghana=Ghanaian version
}}

gives " default text[-]Zambian version[Z]Kenyan version[K]Rwandan version[R]Sierra Leonean version[S]Ugandan version[U]Ghanaian version[G]", where on localised pages only the appropriate string appears, see Template:Local/help/rw and Template:Local/help/zm.

It's possible to display the 'default' value only on page that would otherwise show all values:

{{Local
|default=default text
|Zambia=Zambian version
|Kenya=Kenyan version
|Rwanda=Rwandan version
|Sierra Leone=Sierra Leonean version
|Uganda=Ugandan version
|Ghana=Ghanaian version
|defaultonly=1
}}

gives default text I.e. the "defaultonly" attribute shows the default text only, which can be useful for images, as you would otherwise see a stack of images.

Setting a default

With default

With a default setting, the default text is displayed for all countries, except where specific values are given:

{{Local
|default=default value
|Rwanda=Rwandan version
}}

gives "default value[-]...[Z]...[K]Rwandan version[R]...[S]...[U]...[G]", see Template:Local/help/rw (which displays "Rwandan version") and Template:Local/help/zm (which displays "default value").

Without default

If no default is given, only the present values countries are displayed on localised pages:

{{Local
|Rwanda=Rwandan version
}}

gives "Rwandan version[R]", see Template:Local/help/rw (which displays "Rwandan version") and Template:Local/help/zm (which displays nothing).

With default, blanking one value

With a default setting, the default text is displayed for all countries, except where specific values are given, including a blank value:

{{Local
|default=default value
|Rwanda=
}}

gives "default value[-]...[Z]...[K][R]...[S]...[U]...[G]", see Template:Local/help/rw (which displays "" in the Rwandan version) and Template:Local/help/zm (which displays "default value").