Page MenuHomePhabricator

Add appropriate category to page depending upon banner
Closed, DeclinedPublic

Description

Once the banner is added to a page, an appropriate category needs to be appended to the page out of: Has default banner, Has custom banner, Banner missing from Wikidata.

Related Objects

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.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is problematic and difficult to update as categories are mutually exclusive e.g. a page that has "Has default banner" category loses "Banner missing from Wikidata."

There is no api to remove categories, and given that categories need to be translateable it will not be clear which category is the right to remove.

This requires some thought as maybe there is a better way to do this...

After https://gerrit.wikimedia.org/r/#/c/221459/ manipulation of Categories should be fairly easy, by just returning appropriate Category as "[[Category:Has Custom Banner]]" as result of parser function.
What should be the preferred way for categories out of the following alternatives:

  • Return a hardcoded value "[[Category:Has Custom Banner]]"
  • Return a single customized value $wgCustomBannerCategory = "[[Category:Has Custom Banner]]"
  • Allow users to return a set of categories $wgCustomBannerCategories= array( "[[Category:Has Custom Banner]]", "[[Category:Has PAGEBANNER magic word]]" )
  • Do nothing(Return nothing) and let users manage categories separately.

Note that the above return values signify addition of those categories to the page on which {{PAGEBANNER}} will be used.

Change 225904 had a related patch set uploaded (by Sumit):
WikidataPageBanner add custom banner category

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

What is the current status of this task. Is it a problem not having this?

Jdlrobson changed the task status from Open to Stalled.Sep 25 2015, 12:05 AM

Change 225904 abandoned by Sumit:
WikidataPageBanner add custom banner category

Reason:
Given,wikivoyage already has a way to add category through template, abandoning this change.

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

The original purpose was to add categories to banners, however that is already achieved through the template which uses {{PAGEBANNER}} so this task seems redundant now.

Sumit set Security to None.