• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Minified JS in templates : don't forget to escape curly brackets {}


Well-known member
If you minify your JS script (see this online service) and paste it in your templates, you will get an error during saving the template. To avoid this, just add a space between and after curly brackets "{}".

If you've got a regex editor
Replace ALL:
=> there is a space before and after the $1.

And everything will work :)

Oh, by the way, when you use JS script in template, you can use style property shortcuts inside code, ie:
That's great !


Well-known member
Good to know about this.
Thanks. Here is an example for the color in JS:

var colorbg_first = '@breadcrumbItemFirstCrumb.background-color';
var color_first = '@breadcrumbItemFirstCrumb.color';
So to have just one value of a class, just had a point (.) after the class called with the aerobase (@) sign.