Macro syntax for concatenating JavaScript files

James Jarrett asked on December 4, 2014 21:58

Is there a Macro syntax for concatenating JavaScript files like there is for CSS?

For example (CSS): /* #CSS Includes# */

/* jQuery plug-ins */ {% CSS["jquery.more"] #%}

/* FSC Specific Styles */ {% CSS["academics"] #%} {% CSS["student-life"] #%} {% CSS["about"] #%} {% CSS["financial-aid"] #%} {% CSS["admissions"] #%}

Correct Answer

Brenden Kehren answered on December 5, 2014 13:51

I don't believe there is (I may be wrong on this as well). Only reason I don't believe there is, is because the javascript files are physical files and aren't stored or processed like a regular Kentico database driven stylesheet is. This would be assuming you are using the database driven stylesheet vs. a stylesheet physically in the file system.

1 votesVote for this answer Unmark Correct answer

Recent Answers


James Jarrett answered on December 5, 2014 14:33

I figured the answer was probably no when I couldn't find anything in the docs.

As a general rule I like to keep everything in Kentico and manipulate it from the CMS UI. I can create a single concatenated file outside of Kentico and add it to the CMS easy enough though.

Thanks Brenden.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 5, 2014 14:59

Yeah unfortunately thats where the JS files differ from CSS. It would be ideal of they could be just like CSS but not sure that is possible quite yet.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.