Heiya Nischay,

I'd say be bold and go for it!

Cheers Karsten

Am 13.08.2015 um 22:12 schrieb Nischay Nahata:
Thanks Brion. That worked great. Do you think its okay to put this in the
Manual for Tag extensions?

Regards,
Nischay Nahata

On Thu, Aug 13, 2015 at 7:41 PM, Brion Vibber <[email protected]> wrote:

What you need to do here is attach the modules to the ParserOutput -- which
gets cached -- rather than directly to the OutputPage ($wgOut) object.

   function myCoolHook($text, $params, $parser, $frame) {
     // ... do stuff ...
     $parser->getOutput()->addModules( 'ext.mycoolext' );
     $parser->getOutput()->addModuleStyles( 'ext.mycoolext.styles' );
     // etc
   }

The module list will then be automatically taken from the ParserOutput
object and added to $wgOut even when the page rendering is pre-cached.

-- brion

On Thu, Aug 13, 2015 at 5:33 AM, Nischay Nahata <[email protected]>
wrote:

Hi everyone,

I am using an tag extension where modules and head items are added to
$wgOut

I am observing a weird behaviour where the modules get added when I am
browsing as a logged in user but doesn't get added when I am logged out.
Similarly if I run the rebuildFileCache script the modules won't be
added.
What's the right way to load modules in a tag extension?

Thanks in Advance.

Regards,
Nischay Nahata
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to