Template:Pagebanner/doc
This is a documentation subpage for Template:Pagebanner. It contains usage information, categories and other content that is not part of the original template page. |
This template places a banner and horizontal Table of Contents at the top of travel guide pages. It is a wrapper around the WikidataPageBanner extension and should be used instead of invoking the extension directly. For more information about page banner usage on Wikivoyage, see Wikivoyage:Banner Expedition.
Usage
[edit]Basic usage: {{Pagebanner|image name}}
. Be sure to omit the File:
prefix.
- To use the default banner which inserts the page name and TOC on top of a generic image, simply type
{{Pagebanner}}
. - To get the default banner for the region or type of article, select the appropriate keyword from the list below and substitute it for the image filename.
- For destination articles, one of:
Europe
,North America
,Middle East
/ME
,North Africa
,Asia
,South America
/Africa
/SA
,Caribbean
,Australia
,Oceania
orNew Zealand
/NZ
. - For travel topics:
Travel topic
/Topic
/TT
or one of the more specific ones below.Flying
,Dive guide
/Diving
/Dive
,Itinerary
orPhrasebook
.
- For disambiguation pages:
Disambiguation page
/disambig
- For destination articles, one of:
image name
: Enter the name of the image to use in the banner (excluding "File:"). Images should have a width-to-height ratio of 7:1 and be at least 1800px wide, preferably 2100×300px.
Customized usage: {{Pagebanner|image name|caption=|pgname=|disambig=|origin=|star=|dotm=|otbp=|ftt=}}
Parameters
[edit]General
[edit]|caption=
: (Recommended) Set|caption=description
to supplydescription
text that describes the picture as a tooltip when the mouse pointer hovers over the banner.|pgname=
: (Optional) Enter|pgname=name
to change the page name displayed in the banner; only use if you want it to be different than the formal name of the page.|disambig=
: (Optional) Displays a disambiguation icon in the banner (a question mark) and the disambiguation hatnote after the banner. Enter|disambig=yes
if the name of the disambiguation page is page name (disambiguation) or|disambig=disambiguation page name
if the disambiguation page name differs from that format.|origin=
: (Optional) Use this parameter to define the focal area of the image so that it can be cropped appropriately on small screens. The value of the parameter should consist of a pair of Cartesian coordinates (x and y) separated by a comma. Each coordinate represents a position on its respective axis as a value from -1 to 1, which represent the leftmost/topmost and rightmost/bottommost edges of the image, respectively. For example,|origin=1,1
is the top-right corner and|origin=-1,1
is the top-left corner, with the default being|origin=0,0
or the geometric center of the image. There is a graphic on Phabricator Ticket #108785 that shows this information visually.|fop=
: (Optional) Enter|fop=yes
for freedom-of-panorama banners, which are not allowed on Commons, to remove them from applicable maintenance categories.|notoc=
: (Optional) Enter|notoc=true
to stop the Table of Contents from being included in the banner and for the typical TOC block to be shown within the article itself, instead. Mainly for use on articles with lots of sections.
Classification
[edit]|star=
: (Optional) Enter|star=yes
if placed on a Star article to display the Star article symbol in the top right corner of the page.|dotm=
: (Optional) Enter|dotm=yes
if the article is a previous Destination of the month to display the DotM symbol in the top right corner of the page and add it to the appropriate category.|otbp=
: (Optional) Enter|otbp=yes
if the article has been featured on Off the beaten path to display the OtBP symbol in the top right corner of the page and add it to the appropriate category.|ftt=
: (Optional) Enter|ftt=yes
if the article has been a Featured travel topic to display the Ftt symbol in the top right corner of the page and add it to the appropriate category.|index=
: (Optional) Enter|index=yes
for banners on title or index pages, or pages in other Main namespace article categories which do not always get banners.
UNESCO tags
[edit]|unesco_whs=
: (Optional) Enter|unesco_whs=yes
if the article is or describes a site on the UNESCO World Heritage List; only the lowest-level articles in the hierarchy should be tagged (i.e. add this to Sydney/City Centre which contains the Sydney Opera House, and not Sydney). This displays the World Heritage symbol in the top right corner of the page and adds it to the appropriate category.|unesco_ich=
: (Optional) Enter|unesco_ich=yes
if the article is or describes a UNESCO Intangible Cultural Heritage; only the lowest-level articles in the hierarchy should be tagged. This displays the Intangible Cultural Heritage symbol in the top right corner of the page and adds it to the appropriate category.|unesco_gg=
: (Optional) Enter|unesco_gg=yes
if the article is or describes a geopark in the UNESCO Global Geoparks Network; only the lowest-level articles in the hierarchy should be tagged. This displays the Global Geoparks Network symbol in the top right corner of the page and adds it to the appropriate category.|unesco_cc=
: (Optional) Enter|unesco_cc=yes
if the article is or describes one of the UNESCO Creative Cities. This displays the Creative Cities symbol in the top right corner of the page and adds it to the appropriate category.|unesco_br=
: (Optional) Enter|unesco_br=yes
if the article is or describes a biosphere reserve in the UNESCO World Network of Biosphere Reserves. This displays the Man and the Biosphere Programme symbol in the top right corner of the page and adds it to the appropriate category.|unesco=
: (Deprecated) Use one of the more-specific UNESCO parameters above instead.
TemplateData
[edit]This is a documentation subpage for Template:Pagebanner. It contains usage information, categories and other content that is not part of the original template page. |
This template places a banner and horizontal Table of Contents at the top of travel guide pages, with many other information.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Image file | 1 | Filename of the banner image illustrating the article
| File | required |
Caption text | caption | Adds a tooltip describing the picture when the mouse pointer hovers over the banner | Line | suggested |
Page name | pgname | Alters the page title displayed in the banner, only if it is different than the formal name of the page | Line | optional |
Disambiguation | disambig | Enter "yes" if the name of the disambiguation page is page name (disambiguation) or the disambiguation page's name if it is different from the current page; it displays a disambiguation icon in the banner (a question mark) and the disambiguation hatnote after the banner.
| Line | optional |
Focal area of the image | origin | Use this parameter to define the focal area of the image. This is used to crop the banner appropriately on small screens. The value of the parameter should consist of an x and a y coordinate separated by a comma. Each coordinate represents the distance from the center of the image as a value from -1 to 1. For example, origin=1,1 is the top left corner and origin=-1,1 is the bottom left corner. There is a graphic here that shows this information visually.
| Line | optional |
Star article | star | Enter "yes" if the article is a Star article. This displays the Star article symbol in the top right corner. | Boolean | optional |
Destination of the month | otbp | Enter "yes" if the article is has been a Off the beaten path. This displays the OtBP symbol in the top right corner. | Boolean | optional |
Destination of the month | dotm | Enter "yes" if the article is has been a Destination of the month. This displays the DOtM symbol in the top right corner. | Boolean | optional |
Featured travel topic | ftt | Enter "yes" if the article is has been a Featured travel topic. This displays the FFT symbol in the top right corner. | Boolean | optional |
UNESCO World Heritage Site | unesco_whs | Enter "yes" if the article is or describes a site on the UNESCO World Heritage List. Only the lowest level articles in the hierarchy should be tagged (i.e. Sydney/City Centre for the Opera House, not Sydney). This displays the World Heritage symbol in the top right corner and adds a category. | Boolean | optional |
UNESCO Intangible Cultural Heritage | unesco_ich | Enter "yes" if the article is or describes a UNESCO Intangible Cultural Heritage. Only the lowest level guides in the hierarchy should be tagged. This displays the Intangible Cultural Heritage symbol in the top right corner and adds a category. | Boolean | optional |
UNESCO Global Geopark | unesco_gg | Enter "yes" if the article is or describes a geopark in the UNESCO Global Geoparks Network. Only the lowest level articles in the hierarchy should be tagged. This displays the Global Geoparks Network symbol in the top right corner and adds a category. | Boolean | optional |
UNESCO Creative Cities | unesco_cc | Enter "yes" if the article is or describes one of the UNESCO Creative Cities. This displays the Creative Cities symbol in the top right corner and adds a category. | Boolean | optional |
UNESCO Biosphere Reserve | unesco_br | Enter "yes" if the article is or describes a biosphere reserve in the UNESCO World Network of Biosphere Reserves. This displays the Man and the Biosphere Programme symbol in the top right corner and adds a category. | Boolean | optional |
Index page | index | Enter "yes" for banners on title/index pages or pages in other main namespace article categories which do not always get banners.
| Boolean | optional |
Freedom of panorama | fop | Enter "yes" for freedom-of-panorama banners which are not allowed on Commons, to remove them from applicable maintenance categories
| Boolean | optional |
Hide TOC | notoc | Enter "true" to stop the Table of Contents from being included in the banner and for the typical TOC block to be shown within the article instead; mainly to be used on articles with lots of sections.
| Boolean | optional |
UNESCO element | unesco | Use the specific UNESCO parameter instead. | Boolean | deprecated |