Last modified: 2013-09-04 11:48:18 UTC
Skins use $this->html( 'headelement' ); now for the complete head section. How can I adjust the meta tags? The OutputPageBodyAttributes hook is only for the body tag. In 1.16a I used to manipulate the meta description directly. Bow I cannot change a single tag of the head section. Sorry if I miss something and major priority os wrong.
Does $wgOut->addMeta function do what you want? (See http://svn.wikimedia.org/doc/classOutputPage.html#a0b492edfed8cf9eafc32580008e26027 )
Thanks for the hint. This looks correct to me and returns no error message but also doesn't add the desired tag: $this->html( 'headelement' ); global $wgOut; $wgOut->addMeta('description', 'Foo Bar');
At which point are you calling that. If its in the skin its probably being called too late (calling $wgOut->addMeta after the meta tags are finalized won't do anything).
Yep, in the skin (monobook). Somehere above $this->html( 'headelement' ); doesn't do the trick either. Where else? Can't use it in LocalSettings.php since I want to add the 'catlinks' in the description. Normally I wouldn't care much about the meta tags but it's for Facebook's scraper.
Before SkinTemplate::outputPage is called. Which is probably most any hook before skin stuff starts. OutputPageMakeCategoryLinks seems like the ideal one, since you're passed an OutputPage object, and an array of categories, so no evil globals required.
Ahhh. So LocalSettings.php is the place to be :) Thanks!
I'm going to go ahead and close this bug invalid. Cheers.