Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

$ThemeDir doesn't work in javascript require


Reply


336 Views

Avatar
thany

Community Member, 6 Posts

25 January 2014 at 3:25am

Edited: 25/01/2014 3:25am

I have this code:

<% require javascript("$themeDir/javascript/bl.js") %>


Doesn't work. Nothing gets included.

If I replace the $themeDir by the actual themedir, e.g. "themes/themename", then it does work. This also works:

<script src="$ThemeDir/javascript/bl.js"></script>


Why not in a require?