Refsmmat Posted May 7, 2022 Posted May 7, 2022 Hi, I use some of the forum grid view css styles on my own page. Is there a way to force the "forums.css" file to get loaded? Per default it is not getting loaded on an own page. Of course I could use a <link stylesheet> tag to load it, but that would then a fixed one from the current theme. If I allow my users to change the theme (dark/light mode) I would not be able to point to the "forums.css" of the current selected skin, but would always hard code to the file of one specific theme. So I wonder if there is a way to get the "forums.css" file automatically loaded? If have tried to place all forum widgets/blocks on the page, but none triggered the "forums.css" file to get loaded. Regards, Tom.
Jim M Posted May 8, 2022 Posted May 8, 2022 Thanks for posting! Unfortunately, this issue is beyond the scope of our technical support. 👩💻 Our technical support is happy to help you with the Invision Community platform, but we're unable to help with things like server management, theme questions and modifications. I've moved this to our Community Support area where other Invision Community owners will see it and help where they can.
Sonya* Posted May 8, 2022 Posted May 8, 2022 If your own page is made with Pages, then you can add this to the page template: {{\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'forums.css', 'forums', 'front' ) );}} Refsmmat 1
Refsmmat Posted May 8, 2022 Author Posted May 8, 2022 Hi Sonya, that is exactly what I was looking for and it works like a charm. Thanks a million 🙂 Tom.
Recommended Posts