[Mediawiki-l] All pages that use <mytag>?

Daniel Barrett danb at VistaPrint.com
Thu Apr 19 17:24:50 UTC 2007


>That would be the simplest approach. An example of doing this can be
found at
http://www.mediawiki.org/w/index.php?title=User:Robchurch/Categorising_p
arser_hook&oldid=83537

Thank you Rob! That worked. All the pages that use <mytag> now list the
new category at the bottom.  However, the category page does not list
any pages at all.  Will they eventually show up? Or do I need to visit
each page individually and do a dummy edit/save operation?

Incidentally, <mytag> calls $wgParser->disableCache() if that matters.

My code:

  $categoryName = 'Pages that use my tag';
  $cat = Title::makeTitle( NS_CATEGORY, $categoryName );
  $wgParser->mOutput->addCategory( $cat->getDBkey(),
$wgParser->mTitle->getPrefixedText() );

Thanks,
DanB

---------------------
Confidentiality note
The information in this email and any attachment may contain confidential and proprietary information of VistaPrint and/or its affiliates and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may cause liability. In case you have received this message due to an error in transmission, please notify the sender immediately and delete this email and any attachment from your system.
---------------------



More information about the MediaWiki-l mailing list