solved Script in index.tpl generating a syntax error

Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
I am trying to insert my ad server scripts into my site. There is one script that goes into the header (meta.tpl) and that I was able to do with no problem.

However, inserting the following into my index.tpl generates a syntax error and the file is not saved.

<script type="text/javascript">broadstreet.zone(#####, {responsive: true});</script>

I did fix one typo I carelessly inserted which initially kept the file from being saved but even after finding and fixing the typo (mismatched braces) the error is still being generated.

This goes in the member marketplace section.

updated by @claygordon: 04/20/15 10:53:14AM
paul
@paul
10 years ago
4,335 posts
Try putting it inside literal smarty tags -
{literal}<script type="text/javascript">broadstreet.zone(#####, {responsive: true});</script>{/literal}
The JR smarty parser might be seeing those curly brackets and trying to parse them.


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
That was what was happening. Made the change, saved the template, and reloaded the home page. No errors.

Thanks again.

Tags