PDA

View Full Version : How do I print the value stored in THIS_SCRIPT in a template?


echamberlain
01-16-2007, 10:28 PM
How do you use THIS_SCRIPT in a template outside of a conditional statement?

I need the value stored in THIS_SCRIPT to print in some template javascript code so phpAdsNew can track the ad request source.

Adding
<script type="text/javascript"> <!--
// phpAdsNew variables
var panSource = "THIS_SCRIPT";
// --> </script>

to the template doesn't work. THIS_SCRIPT is passed to javascript.

noppid
01-16-2007, 10:33 PM
Try moving THIS_SCRIPT into a var like $this_script before the template is parsed. I don't think constants are parsed in templates. But I could be wrong.

Guest190829
01-16-2007, 11:51 PM
Normally I just use a plugin to attach the code to the headinclude in the template. Are you doing this for all pages?