#1693 - Custom-including CSS/JS into Composr

Identifier #1693
Issue type Feature request or suggestion
Title Custom-including CSS/JS into Composr
Status Completed
Handling member Chris Graham
Addon General / Uncategorised
Description Any custom CSS for a design should typically be merged into the theme's global.css (usually placed at the top of the file).

CSS/JS for added libraries can either be...

1) manually linked in via HTML_HEAD.tpl using normal HTML. By convention we place the files in uploads/website_specific/

2) incorporated into Composr as theme CSS/templates. The CSS would go into themes/default/css_custom/ (e.g. example.css), and the JavaScript would go into themes/default/templates_custom/ as a tpl file (e.g. JAVASCRIPT_EXAMPLE.tpl). Include them via {$REQUIRE_CSS,example} and {$REQUIRE_JAVASCRIPT,javascript_example} calls in HTML_HEAD.tpl. Make sure those REQUIRE* symbols are called before CSS_TEMPCODE/JS_TEMPCODE in HTML_HEAD, otherwise they'll be running too late.


Also you might need to put this at the top of a JS tpl file...
{$,Parser hint: .innerHTML okay}
{$,Parser hint: pure}
This serves to stop Composr applying it's standards and parsing for Tempcode.
Steps to reproduce

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated