Data at Your Fingertips: Explore Our New Reporting and Statistical Capabilities By Ryan Ashbrook Tuesday at 01:29 PM
Adrian A. Posted March 12, 2018 Share Posted March 12, 2018 Greetings folks, So basically i have this app which does some modifications into the Forums app and also allows to use some widgets on any app, but i can't make CSS to load, it loads only on my app page. I tried making use of the developers page but wasn't really so helpful. Could someone give me some guidance of how should i proceed? Link to comment Share on other sites More sharing options...
CodingJungle Posted March 12, 2018 Share Posted March 12, 2018 you would need to create a hook into the apps controller execute method (for forums you have the topic.php/forum.php, index.php), so the hook should look something like this: public function execute(){ parent::execute(); \IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles,\IPS\Theme::i()->css( 'mycss.css', 'myapp', 'front' ) ); } Link to comment Share on other sites More sharing options...
Adrian A. Posted March 12, 2018 Author Share Posted March 12, 2018 Damn, it's just... amazing how i didn't think about this. Thanks! xD Link to comment Share on other sites More sharing options...
Martin A. Posted March 13, 2018 Share Posted March 13, 2018 13 hours ago, CodingJungle said: you would need to create a hook into the apps controller execute method (for forums you have the topic.php/forum.php, index.php), so the hook should look something like this: public function execute(){ parent::execute(); \IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles,\IPS\Theme::i()->css( 'mycss.css', 'myapp', 'front' ) ); } Better to use \IPS\Dispatcher\Front::finish(), if OP want this to be loaded globally on the front end. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.