[MediaWiki-l] Categories + parser functions

Daniel Barrett danb at VistaPrint.com
Fri Jan 4 17:53:18 UTC 2013


Jeremy Baron's idea about tracking categories is probably what you want. You can write a parser function that, instead of emitting strings (category names), actually DOES the categorizing for you. Here is his link again:

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/parser/Parser.php;hb=c86a77bc4860b5fad2e70b473ef525844034b127#l4005

DanB

-----Original Message-----
I'm creating pages that represent stores, and the format of every store page is identical, so each store page transcludes the same store template (which is used approximately like this: {{ store_template | storeID }}).
But stores belong to different categories depending on the kinds of goods they sell. I have a parser function that, given the storeID, can fetch the right good type from a database, so I want to use that function in the store_template to categorize every store page dynamically.



More information about the MediaWiki-l mailing list