Jump to content

Include app css in plugin


Recommended Posts

Hello I am trying to create a plugin to add a country flag in the hovercard. I am using <span class="ipsFlag ipsFlag-{$country}"></span> but the flag doesn't show up. It seems that the flags.css isn't even loading. How can I have my plugin ensure that css is loaded? Also if I want to pull css from an installed app how could I make my plugin do that as well?

Link to comment
Share on other sites

  • 1 month later...

I'm still having issues with the css not loading. Not sure where I need to put this. I tried to hook it into includeCSS, that didn't work. I put it under the <ips:template parameters="" /> in my plugin.phtml, not working either. Any direction?

{{\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'flags.css', 'core', 'global' ) );}}

<span class="ipsDataItem_main">
  <span class='ipsFlag ipsFlag-{expression="mb_strtolower($country)"}'></span>	


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...