Page MenuHomePhabricator

Options for {{PAGEBANNER}} parser function
Closed, ResolvedPublic

Description

As per T93106, a number of options have to be added to the {{PAGEBANNER}} parser function, to customize the article banner on which its used.
Taken from the template's doc page:

  • caption text: Recommended. Enter caption=description to display a description of the picture when a mouse pointer is placed over the banner image.
  • page name: Optional. Enter pgname=name to display in the banner. Only enter a name if you want it to be different than the formal name of the page.
  • disambiguation: 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). Enter disambig=disambiguation page name if the disambiguation page name is different from the current page name.
  • star: Optional. Enter star=yes if the guide is a Star article. This displays the Star article symbol in the top right corner.
  • DotM: Optional. Enter dotm=yes if the guide is a previous Destination of the month. This displays the DotM symbol in the top right corner.
  • OtBP: Optional. Enter otbp=yes if the guide has been featured on Off the beaten path This displays the OtBP symbol in the top right corner.
  • Ftt: Optional. Enter ftt=yes if the guide has been a Featured travel topic. This displays the Ftt symbol in the top right corner.
  • unesco: Optional. Enter unesco=yes if the guide is or describes a site on the Unesco World Heritage list. Only the lowest level guides in the hierarchy should be tagged (ie, Sydney/City Centre for the Opera House, not Sydney). This displays the World Heritage symbol in the top right corner and adds a category.
  • TOC box: Optional. Enter box=black for the TOC to appear in a translucent black box with white type. Enter box=white for the TOC to appear in a translucent white box with black type. Enter nothing for the default solid grey box with black type.
  • notoc: Optional. Enter notoc=true to stop the TOC being included in the banner and for the entire TOC to be shown within the article instead. Mainly to be used on articles with lots of sections.
  • index: Optional. Enter index=yes for banners on title/index pages or pages in other main namespace article categories which do not always get banners.
  • fop: Optional. Enter fop=yes for freedom-of-panorama banners which are not allowed on Commons, to remove them from applicable maintenance categories
  • (from banner expedition discussion) Some thoughts regarding the sub-headings of TOC can be taken

Event Timeline

Sumit claimed this task.
Sumit raised the priority of this task from to Needs Triage.
Sumit updated the task description. (Show Details)
Sumit added a project: Wikidata-Page-Banner.
Sumit added subscribers: Sumit, Jdlrobson, Nicolas_Raoul, Bene.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

A comment from @Bene, on the original proposal in this regard:

Use Wikidata's badges instead which can also be fetched automatically in your PHP code. Some of them don't exist on Wikidata yet so they should be created and added to the configuration. This requires a task on the Wikidata board.

Change 214672 had a related patch set uploaded (by Sumit):
WikidataPageBanner allow named parameters

https://gerrit.wikimedia.org/r/214672

Change 214895 had a related patch set uploaded (by Sumit):
WikidataPageBanner add option caption

https://gerrit.wikimedia.org/r/214895

Change 215029 had a related patch set uploaded (by Sumit):
WikidataPageBanner option to add icons added

https://gerrit.wikimedia.org/r/215029

Change 214672 merged by jenkins-bot:
WikidataPageBanner allow named parameters

https://gerrit.wikimedia.org/r/214672

opening since we've only got the infrastructure in place. We'll probably want to create sub tasks for all the parameters...

@Sumit please create sub tasks here for the patchsets you have open and have not completed yet... thanks!

Updated the test wiki with the above patch.

Striking off the one's either done, will not be done, or will be handled elsewhere with reason for each:

  • TOC box
  • notoc

The above two will be handled as part of T97839

  • index becomes redundant as the extension supports $wgBannerNamespaces config option.
  • fop - After discussion with Nicolas, conclusion was that fop does not require any code logic in place.
  • pgname - Done as part of https://gerrit.wikimedia.org/r/#/c/214672/
  • disambiguation - Closed as the functionality is implemented using {{Template:Other_uses}} and {{Template:disamb}} on English Wikivoyage.
Sumit set Security to None.

Change 214895 merged by jenkins-bot:
WikidataPageBanner add option tooltip

https://gerrit.wikimedia.org/r/214895

Change 215029 merged by jenkins-bot:
WikidataPageBanner option to add icons added

https://gerrit.wikimedia.org/r/215029