Jump to content

Community Wishlist Survey 2023/Archive/Add a LUA function to check whether given page is in given cat

From Meta, a Wikimedia project coordination wiki

Add a LUA function to check whether given page is in given cat

NoN Outside the scope of Community Tech

  • Problem: No way to check from a template or module whether a certain page is in a certain category. This is needed for some templates on wiktionary.
  • Proposed solution: Add a LUA function to check whether given page is in given category. It will take two strings (name of category, name of page), and return a boolean revealing whether the page is in there, irrespective whether the category page is created (ie blue) or not (ie red)
  • Who would benefit: Template and module contributors on wiktionary and probably even other wikis, consequently all users.
  • More comments: There is a hacky extension for exactly this purpose, but it is not enabled on any WMF wiki. This is a trivial task, so a native implementation would be way simpler than bothering with another extension, and is thus preferable.
  • Phabricator tickets:
  • Proposer: Taylor 49 (talk) 10:05, 5 February 2023 (UTC)[reply]

Discussion