View Issue Details

IDProjectCategoryView StatusLast Update
1693Composr documentationGeneral / Uncategorisedpublic2014-12-03 15:00
ReporterChris Graham Assigned ToChris Graham  
PrioritynormalSeverityfeature 
Status resolvedResolutionfixed 
Summary1693: Custom-including CSS/JS into Composr
DescriptionAny 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.
TagsNo tags attached.
Attach Tags
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised