Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Something weird..

it goes like this:
i've got a template used to index the contents of a folder. in each folder there is a blank file using that template. i switched the table design with a css one, and CD gives me an error notice. the code looks like this:

{$ foreach x in (and(thisFolder)(not(thisArticle))) $}
<!-- {$odd$} -->
<div class="container">
<div class="subHeadline">
    <img vspace="0" hspace="0" height="40" alt="*" src="PTMFOG0000000442.gif" width="100" align="left" border="0" />
        <a href="{$x.extra1$}"><strong>{$x.headline$}</strong></a>
<div class="subWhite">
    <p class="smalltype">
        &#1513;&#1508;&#1492;(&#1493;&#1514;): {$x.extra2$}<br />
        <a href="{$x.extra1$}">{$x.extra1$}</a>

it gives: "The variable x.extra1 is not defined. (\portal\dir\subdir\)
An error occurred while publishing, so the site was not uploaded."

when using it combined with the table version (using {$odd$}, {$even$} functions): both work.


nigel godrich
Wednesday, August 27, 2003

Not sure about if this will solve it.  You have {$Odd$} commented out with html comments.  CityScript doesn't seem to care about those comments and so it does whatever it does with Odd.  Clip that line out and try it again.  Who knows?

Joel Goldstick
Wednesday, August 27, 2003

I tried running that code and it ran OK (at least, it didn't produce any errors). Might it be something else in a different file that's causing the problem?

Joel Spolsky
Wednesday, August 27, 2003

thanks, problem solved.

even though the CS is clipped between <!-- -->, CD still tries to run it. that's probably why it worked with the weird combination of the versions before. Well then, a rather minor bug found here. Just need to make CD ignore *everything* within <!-- -->. thanks for the help joel.

nigel godrich
Wednesday, August 27, 2003

*  Recent Topics

*  Fog Creek Home