Astroid-Framework icon indicating copy to clipboard operation
Astroid-Framework copied to clipboard

Custom CSS and Custom JS input field notes

Open shoulders opened this issue 6 years ago • 1 comments

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

add-notes-inline-file-location

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

shoulders avatar Sep 28 '19 16:09 shoulders

I'll take care of this Jon.

chetanmadaan avatar Oct 01 '19 17:10 chetanmadaan