User:JanSlupski/Projects/QuickBar
From Wikitravel
<!-- begin quick bar --> {{ QBbegin }} {{ QBtitle | Flag }} {{ QBimage | pl-flag.png }} {{ QBtitle | Quick Facts }} {{ QBline | Capital | [[Warsaw]] }} {{ QBline | Government | republic }} {{ QBline | Currency | zloty (PLN) }} {{ QBline | Area | ''total:'' 312,685 sq km <br>''water:'' 8,220 sq km <br>''land:'' 304,465 sq km }} {{ QBline | Population | 38,625,478 (July 2002 est.) }} {{ QBline | Language | Polish }} {{ QBline | Religion | Roman Catholic 95% (about 75% practicing), Eastern Orthodox, Protestant, and other 5% }} {{ QBline | Country Calling Code | +48 }} {{ QBline | Internet TLD | .pl }} {{ QBline | Time Zone | CET/CEST (UTC+1/+2) }} {{ QBend }} <!-- end quick bar --> Extensible QuickBar with use of templates.
[edit] Why
Why I want to reinvent the weel...
- currently encoded (HTML) QuickBars may frighten begginers
- Wiki style tables are cleaner, but need more space (lines) and still suffer of all style definitions mess
- QB source should be cleaner to view (or skip)
- QB editing should be more intuitive
- don't loose flexibility (in opposition to predefined Template:Country_Quickbar used in User:Bijee/India)
- possible to define fixed Country_Quickbar, City_Quickbar and other templates using this
[edit] How
Creating QuickBar would be a sequence of template calls. Titles & images would have one parameter. Ordinary lines two.
[edit] Why this doesn't work
-
WikiMedia has to be at least in version 1.4 to support more than five lines based on the same template. See MetaHelp:Template. - WikiTravel policy currently does not allow this kind of templates. See Wikitravel:Using Mediawiki templates and its discussion
[edit] Example source
Source of QuickBar shown at right would look like:
<!-- begin quick bar -->
{{ QBbegin }}
{{ QBtitle | Flag }}
{{ QBimage | pl-flag.png }}
{{ QBtitle | Quick Facts }}
{{ QBline | Capital | [[Warsaw]] }}
{{ QBline | Government | republic }}
{{ QBline | Currency | zloty (PLN) }}
{{ QBline | Area | ''total:'' 312,685 sq km <br>''water:'' 8,220 sq km <br>''land:'' 304,465 sq km }}
{{ QBline | Population | 38,625,478 (July 2002 est.) }}
{{ QBline | Language | Polish }}
{{ QBline | Religion | Roman Catholic 95% (about 75% practicing), Eastern Orthodox, Protestant, and other 5% }}
{{ QBline | Country Calling Code | +48 }}
{{ QBline | Internet TLD | .pl }}
{{ QBline | Time Zone | CET/CEST (UTC+1/+2) }}
{{ QBend }}
<!-- end quick bar -->
[edit] Templates used
- Template:QBbegin
- Template:QBtitle
- Template:QBimage
- Template:QBline
- Template:QBend

