this is so weird. i can’t figure it out! here’s a snippet of my code.
{exp:weblog:entries weblog="case_studies" limit="1" disable="member_data|trackbacks|pagination" dynamic="on"}
{if cs_ss_image2 || cs_ss_image3 || cs_ss_image4 || cs_ss_image5 }
< script type="text/javascript" language="javascript" >
doclay = (document.layers)? true : false
docall = (document.all)? true : false
docget = (document.getElementById)? true : false
thisImg = 0
{if cs_ss_image2 && cs_ss_image3 && cs_ss_image4 && cs_ss_image5 }
imgCt = 4
{if:elseif (cs_ss_image2 && cs_ss_image3 && cs_ss_image4) && (cs_ss_image5 == "")}
imgCt = 3
{if:elseif (cs_ss_image2 && cs_ss_image3) && (cs_ss_image4 == "") && (cs_ss_image5 == "")}
imgCt = 2
{if:elseif cs_ss_image2 && (cs_ss_image3 == "") && (cs_ss_image4 == "") && (cs_ss_image5 == "")}
imgCt = 1
{if:else}
imgCt = 0
{/if}
baseCt = 0
....
< / script >
{/if}there are other if statements in the javascript code too but i cut them out for brevity. when i look at the source of my page, the if statements with the rendered custom field variables are dumping to the html. they aren’t rendered. BUT if statements outside of the
< script type="text/javascript" language="javascript" >< script type="text/javascript" language="javascript" >< script type="text/javascript" language="javascript" >be causing if statements not to render? i’m so stumped.
BTW, this is an article page so dynamic is turned on so that exp:weblog:entries grabs the proper content.
p.s. spaces in the javascript tags are there because the forum removed the tags otherwise.