Template:Local/help: Difference between revisions

From OER in Education
No edit summary
No edit summary
Line 39: Line 39:
}}
}}
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.
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.
= No default =
= Setting a default =
== With default ==
With a default setting, the default text is displayed for all countries:
<nowiki>{{</nowiki>Local
|default=default
|Rwanda=Rwandan version
}}
Gives
{{Local
|default=default
|Rwanda=Rwandan version
}}
(See [[Template:Local/help/rw]] and  [[Template:Local/help/zm]]
 
== Without default ==
If no default is given, only the present values countries are displayed on localised pages:
If no default is given, only the present values countries are displayed on localised pages:
  <nowiki>{{</nowiki>Local
  <nowiki>{{</nowiki>Local

Revision as of 21:38, 7 January 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
}}

Gives default text[-]Zambian version[Z]Kenyan version[K]Rwandan version[R]Sierra Leonean version[S]Ugandan version[U]...[G]

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
|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:

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

Gives default[-]...[Z]...[K]Rwandan version[R]...[S]...[U]...[G] (See Template:Local/help/rw and Template:Local/help/zm

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 and Template:Local/help/zm