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 /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

$ThemeDir doesn't work in javascript require

Go to End

2 Posts   2586 Views


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?


Community Member, 1 Post

21 October 2015 at 8:55pm

It's because of the "$Theme..." and not "$theme..." ?