Plugin Stylesheet 404 Hey guys I have created a plugin with an accompanying Stylesheet which I am adding to the page via 

class SitemaphtmlPlugin extends BasePlugin
{

function init(){

     craft()-&gt;templates-&gt;includeCssResource('sitemaphtml/css/sitemaphtml.css');
}


however the link being generated is prefixing the path with cpresources/ making it 404.

/cpresources/sitemaphtml/css/sitemaphtml.css?x=xXhFyszUs 


how can i overcome this this?

Cheers
Is your css file located in the /resources/ folder of your plugin? So your path should be something like:

&lt;plugin folder&gt;/resources/css/sitemaphtml.css


I've tried it myself and whilst you do get the /cpresources/ part of the Url in your markup, the CSS file is loaded on the front end.

EDIT: If you take a look in the docs, it says the following:


  By default, Craft will search for the resource file in its own
  craft/app/resources/ folder. If it can’t find the file there, it will
  check if the first segment of the resource path is set to a plugin
  handle. If it is, Craft will look for the resource file within that
  plugin’s resources/ folder.