Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted May 7, 20222 yr 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.
May 8, 20222 yr Community Expert 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.
May 8, 20222 yr 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' ) );}}
May 8, 20222 yr Author Hi Sonya, that is exactly what I was looking for and it works like a charm. Thanks a million 🙂 Tom.