Hi
I have a section of my template trying to define some javascript to be output based on channel content. Some of it should only appear conditionally within the javascript section - so for example i have in my template
<sscript type="text/javascript">
function initialize() {
{exp:channel:entries channel="dealers" }
{if count == 1}
// do something
{/if}
{/exp:channel:entries}
</sscript>- however the conditionals within the channel tag pair do not work and instead I get for example being output
<sscript type="text/javascript">
function initialize() {
{if "1" == 1}
// do something
{/if}
</sscript>
so instead of the conditionals being evaluated within the template - I get
{if "1" == 1}and
{/if}appearing in the HTML code - how do I fix this ?
The parsing of the template must somehow think my conditionals are not EE conditionals
Note the spelling of script as sscript in the tag above is purely so the code displays here in this forum entry