This is the talk page for discussing improvements to the Global Lua Modules/Pageinfo page.
- Please sign and date your posts by typing four tildes (
~~~~). - Put new text under old text. Click here to start a new topic.
- If you're new to the wiki, please take a look at the talk page help.
- Be polite
- Assume good faith
- Be welcoming
Only for explicit categories[]
A little notice for anyone else looking to use this–
This will only find categories that are explicitly defined within the article. Categories 'adopted' through template transclusion will not be picked up.
However, with a little modification, it will work. I had used frame:preprocess on the pageContent variable in the hasCategory function, and, generally, it will then work. I will refrain from modifying the module, in case if this *is* actually expected behavior. — The JoTS on yer wall. (talk) 22:04, June 23, 2016 (UTC)
Strictly speaking the template's category is 'not' on the page. Also this was more of a proof of concept than something I expected people to really use. Categories are actually page metadata, and these kind of tools should really be part of mediawiki/ scribunto / lua API``:
Anyway, I wouldn't mind if you added a parameter to explicitly request both the categories on the page, and in transclusions. Dessamator (talk)