This is a documentation subpage for Template:Australia topic. It may contain usage information, categories and other content that is not part of the original template page. |
This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. |
This template allows for the quick creation of a navigational template for any group of articles which contains the names of Australian states. It uses {{Navbox}}
to create the navigation box.
{{Australia topic
<!-- passed through to Template:Navbox -->
| name =
| state =
| title =
| titlestyle =
| bodystyle =
| groupstyle =
<!-- specific to Template:Australia topic -->
| prefix =
| suffix =
| exclude-int =
| exclude-ext =
}}
{{subst:PAGENAME}}
for this value as a shortcut.One of the following combinations is needed to create the links:
autocollapse
will start out collapsed if there are two or more tables on the same page that use collapsible. If set to collapsed
, the navbox will always start out in a collapsed state. If set to blank or anything other than autocollapse
orcollapsed
, the navbox will always start out in an expanded state.autocollapse
.Tnavbar
. If set to plain
, the v • d • e links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Use off
to remove the v • d • e links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). Note that it is highly recommended that one does not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages.In some instances, the territories may not have their own articles on particular topics. To disable their inclusion in the template and avoid unnecessary red links, add any or all of the following parameters:
Some templates may require a list of links not already included in the template. These can be specified as follows:
Links for Victoria may use "Victoria (Australia)". The following parameter allows for substitution where the article name does not use the default.
| VI = Victoria
titlestyle = background: #0000FF;
titlestyle = background: blue;
background: #ccccff;
abovestyle = background: #ddddff;
belowstyle = background: #ddddff;
groupstyle = background: #ddddff; text-align: right;
liststyle = width: 100%; font-size: 95%;
belowstyle = border-top: #ccccff 1px solid;
background: #ddddff;
groupstyle = background: #6AFB92; vertical-align: top;
background: #ddddff; text-align: right;
liststyle = padding: 0.5em 1em;
width: 100%; font-size: 95%;
{{Australia topic
| title = [[History of Australia]] by political division
| prefix = History of
}}
History of Australia by political division
| |
---|---|
States |
|
Mainland territories |
|
External territories |
|
This example also shows the use of the titlestyle to change the background color and the groupstyle parameters to change the background color and vertical alignment of text.
{{Australia topic
| title = [[List of birds of Australia|Birds of Australia]]
| titlestyle = background: #64E986;
| groupstyle = background: #6AFB92; vertical-align: top;
| prefix = List of birds of
|VI= Victoria
| exclude-ext =y}}
This example also shows the use of the liststyle parameter to add some extra padding around the list, the group1 parameter to remove the "Mainland" heading, and the VI parameter to change link from "Victoria (Australia)" to "Victoria".
{{Australia topic
| liststyle = padding: 0.5em 1em;
| group1 =
| prefix = List of
| suffix = -related topics
|VI= Victoria
| exclude-ext =y}}
Note the use of an underscore in place of the leading space in the suffix. This is done to accommodate the use of suffixes without a leading space, as in the previous example. A title should be specified to avoid the underscore appearing in the title.
{{Australia topic
| title = [[List of rivers of Australia|Rivers of Australia]]
| prefix = List of
| suffix = _rivers
|VI= Victoria
| exclude-ext =y}}
This example shows the use of the group1/ list1 & group5/ list5 parameters to add a group and list above and below the default rows.
{{Australia topic
<!-- passed through to Template: Navbox -->
| title = [[Constitution]]s of [[Australia]]
| group1 = Commonwealth
| list1 = [[Constitution of Australia|Australia]]
| group5 = {{nowrap|External territories}}
| list5 = [[Norfolk Island Act 1979|Norfolk Island]]
<!-- specific to Template: Australia topic -->
| prefix = Constitution of
| VI = Victoria
| exclude-ext= y
}}
| |
---|---|
Commonwealth | |
States |
|
Mainland territories |
|
External territories |
{{Australia topic
<!-- passed through to Template: Navbox -->
| title = [[Law enforcement in Australia|Police forces]]in[[Australia]]
<!-- specific to Template: Australia topic -->
| suffix = _Police
| VI = Victoria
| exclude-ext= y
}}
Code used to create Template:Universities in Australia:
{{Australia topic
<!-- passed through to Template:Navbox -->
| name = {{subst:PAGENAME}}
| title=[[List of universities in Australia|Universities in Australia]]
<!-- specific to Template:Australia topic -->
| prefix = List of universities in
| VI = Victoria
| exclude-ext = y
}}<noinclude>
[[Category:Australia topic navigational boxes]]
</noinclude>
Note: {{subst:PAGENAME}} in the above example would be replaced by Universities in Australia when this code is saved in Template:Universities in Australia.
Result:
Comparison of continent-based templates
| |||||||
---|---|---|---|---|---|---|---|
World |
| ||||||
Generator |
| ||||||
Countries of... |
| ||||||
List of...capitals |
| ||||||
Regions of... |
| ||||||