Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted November 10, 20159 yr I'm trying to make my application load some javascript/CSS if my custom template tag is used. Here is my output plugin code: public static function runPlugin( $data, $options ) { foreach( \IPS\Output::i()->js( 'front_browse.js', 'myapp', 'front' ) as $url ){ \IPS\Output::i()->endBodyCode .= "<script type='text/javascript' src='".$url."'></script>"; } array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css("myappDefault.css", "myapp", "front")); return '\IPS\Theme::i()->getTemplate( "browse", "myapp", "front" )->myAppTemplate( "'.$data.'" )'; } On my dev install, this works perfectly, but when I move it to the live site, it only loads the javascript/CSS once, and then never again. I can make it load again by deactivating my application, and then reactivating it, but that also just makes it load one more time. Can someone please explain this behavior, and how to get around it? The html template is loaded correctly each time, btw.
Archived
This topic is now archived and is closed to further replies.