I’m using a custom plugin extension with Joomla 2.5. This plug-in is targeted for a single page on my site. But for some reason I noticed it loads the css file on every single page.
The code for the plugin loads this css file:
$doc->addStyleSheet($pluginAssetsUrl . '/css/aecuserpage.css');
I don’t assume this is common but I’m not sure about plugins. Can I make it only apply the the page I want instead of every single page. Any thoughts on how to debug this would be appreciated.
The plugin prints a simple table on an article page and uses the plugin function onContentPrepare
Use these snippets to manage your problem:
1) Load CSS by checking the active menu item
2)Load CSS upon component
3)Load CSS only in home page
4)Load CSS upon active menu id
5)Load CSS upon active language:
6)Load CSS upon users
7)Load CSS upon URL