Astroid-Framework
Astroid-Framework copied to clipboard
Custom CSS and Custom JS input field notes
While adding some custom code I came across this issue when I decided I wanted to add an asset/image. Which are inline and which are file includes
In the 'custom Code' section you have the following items
- Custom CSS
- Custom CSS Files
- Custom JS
- Custom JS Files

These items need some extra notes
The extra notes would go on the left and just make it easier to workout what is inline and what is via a file include
- Custom CSS: This code is rendered inline
- Custom CSS Files: This will attach an external CSS file. We recommend putting your file in templates/YOUR_TEMPLATE/custom/custom.css and you can include it with the line templates/tpl_jdseattle/custom/custom.css
- Custom JS: This code is rendered inline
- Custom JS Files: This will attach an external JS file. We recommend putting your file in tempaltes/YOUR_TEMPLATE/custom/custom.js and you can include it with the line templates/tpl_jdseattle/custom/custom.js
Further Idea
Can you add some shortcodes into 'Custom CSS Files' and 'Custom JS Files' to make things easier and more portable.
Consider the following asset.
https://www.mywebsite.com/templates/jdseattle/custom/test.js
- {template} = templates/jdseattle/
- {custom} = templates/jdseattle/custom/
Use them in the fields like
{template}custom/test.js
I'll take care of this Jon.