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.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
WikidataPageBanner add custom banner category | mediawiki/extensions/WikidataPageBanner | master | +4 -2 |
Related Objects
- Mentioned In
- T101079: Track weekly meetings
Event Timeline
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
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.
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.