Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Template:Australia topic

From Wikipedia, the free encyclopedia
States
Mainland territories
External territories
Template documentation[view] [edit] [history] [purge]
This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup andparser functions before editing the template. If your edit causes unexpected problems, pleaseundo it quickly, as this template may appear on a large number of pages.
You can conduct experiments, and should test all major changes, in eitherthis template's sandbox,your own user sandbox, or thegeneral template sandbox, before changing anything.

This template allows for the quick creation of anavigational template for any group of articles which contains the names of Australian states. It uses{{Navbox}} to create the navigation box.

Blank syntax

[edit]
{{Australia topic<!-- passed through to Template:Navbox -->| name       = | state      = | title      = | titlestyle = | bodystyle  = | groupstyle =<!-- specific to Template:Australia topic -->| prefix = | suffix = | exclude-int = | exclude-ext = }}

Parameters

[edit]

Mandatory

[edit]
name
Mandatory when creating a new template (i.e.Template:Hospitals in Australia), otherwise the "view · talk · edit" links will connect toTemplate:Australia topic. You can enter{{subst:PAGENAME}} for this value as a shortcut.

One of the following combinations is needed to create the links:

prefix
Places text before the state or territory name.
suffix
Places text after the state or territory name.
prefixandsuffix
Places text before and after the state or territory name.

Optional

[edit]
state
A navbox withautocollapse will start out collapsed if there are two or more tables on the same page that usecollapsible. If set tocollapsed, the navbox will always start out in a collapsed state. If set to blank or anything other thanautocollapse orcollapsed, the navbox will always start out in an expanded state.
Default is:autocollapse.
title
Text that appears centered in the titlebar (the top bar). This is optional because the use of eitherprefix,suffix or both will automatically generate a title if thetitle parameter is not supplied. This parameter is not automaticallywiki-linked.
navbar*
Defaults toTnavbar. If set toplain, thev • 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. Useoff to remove thev • 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.

Excluding groups

[edit]

In some instances, the territories may not have their own articles on particular topics. To disable their inclusion in the template and avoid unnecessaryred links, add any or all of the following parameters:

exclude-int
Set to any value this excludes display of the group namedTerritories which links to theAustralian Capital Territory and the other internal territories.
exclude-ext
Set to any value this excludes display of the group namedExternal territories which links toChristmas Island,Coral Sea Islands and the other external territories.

Adding groups and lists

[edit]

Some templates may require a list of links not already included in the template. These can be specified as follows:

group1
Header text displayed in cell to left of text specified inlist1.
list1
Text or a list of links that is displayed above the state and territory links.
group5
Header text displayed in cell to left of text specified inlist3.
list5
Text or a list of links that is displayed below the state and territory links.
above
A full-width cell (no group header) displayedabove the template's body (between the title and state/territory links).
below
A full-width cell (no group header) displayedbelow the template's body.

Change state name used in link

[edit]

Links for Victoria may use "Victoria (Australia)". The following parameter allows for substitution where the article name does not use the default.

VI
Replace "Victoria (Australia)" in links with specified text, i.e. "Victoria".
| VI = Victoria

Styles

[edit]
titlestyle
SpecifiesCSS values to apply to the title. One use of this is to set the background color of the title:
titlestyle = background: #0000FF;
titlestyle = background: blue;
Default is:background: #ccccff;
bodystyle
Specifies CSS values to apply to the entire template. This will not override the following{{Navbox}} default styles:
abovestyle = background: #ddddff;
belowstyle = background: #ddddff;
groupstyle = background: #ddddff; text-align: right;
liststyle = width: 100%; font-size: 95%;
abovestyle
belowstyle
Specifies CSS values to apply to the cell specified via theabove andbelow parameters. For instance:
belowstyle = border-top: #ccccff 1px solid;
Default is:background: #ddddff;
groupstyle
Specifies CSS values to apply to the cells specified via thegroupn cells. This option overrides any styles that are applied to the entire table. Example:
groupstyle = background: #6AFB92; vertical-align: top;
Default is:background: #ddddff; text-align: right;
liststyle
Specifies CSS values to apply to the cells specified via thelistn cells. This option overrides any styles that are applied to the entire table. Examples:
liststyle = padding: 0.5em 1em;
Default is:width: 100%; font-size: 95%;

Examples

[edit]

Changing the navbox title

[edit]
{{Australia topic| title=[[History of Australia]] by political division| prefix= History of}}

Excluding display of external territories

[edit]

This example also shows the use of thetitlestyle to change the background color and thegroupstyle 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}}

Adding suffix without leading space

[edit]

This example also shows the use of theliststyle parameter to add some extra padding around the list, thegroup1 parameter to remove the "Mainland" heading, and theVI 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}}

Adding suffix with leading space

[edit]

Note the use of anunderscore 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}}

Adding extra rows

[edit]

This example shows the use of thegroup1/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}}

Using a suffix without a prefix

[edit]
{{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}}

Creating a new template

[edit]

Code used to createTemplate: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 byUniversities in Australia when this code is saved inTemplate:Universities in Australia.

Result:

Templates implemented with Australia topic

[edit]

See also

[edit]
World
Generator
Countries of...
List of...capitals
Regions of...
The abovedocumentation istranscluded fromTemplate:Australia topic/doc.(edit |history)
Editors can experiment in this template's sandbox(create |mirror) and testcases(create) pages.
Add categories to the/doc subpage.Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Australia_topic&oldid=1239894155"
Categories:
Hidden category:

[8]ページ先頭

©2009-2025 Movatter.jp