I'm working on a plugin with it's own CP section as described in the docs here. What is the appropriate way to include CSS styling for that page?


You can include CSS for your plugin one of two ways.

1) Inline CSS

You can include CSS snippets by using {% includeCss myCss %}. This is great if you are just wanting to include a few lines of CSS. Read more here: http://buildwithcraft.com/docs/templating/includecss

2) Reference a Resource CSS file

Usually contained in your /resources folder inside your plugin you can include a CSS file by using {% includeCssResource "pluginName/styles.css" %} You can read more here: http://buildwithcraft.com/docs/plugins/resources

  • 1
    I tried and got both ways working. Thank you!
    – kr37
    May 26 '15 at 2:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.