PDA


View Full Version : Template Question (probably a stupid question)


convergent
05-27-2007, 01:46 AM
I am trying to get a conditional to work here... what I'm trying to do is show three thread title/thread images in a row, then create a new row and repeat, until I have the number of selected rows displayed. I can't get past square one because for some reason this module isn't recognizing an <if>. Here is the template I'm trying to use...


<if $count=0><tr><td class="alt2" align="center"> </if>
<a href="$bburl/showthread.php?t=$result[threadid]" title="$result[title]">
<img alt="$result[title]" src="$result[image]" style="border: 2px #000000;padding:2px;" /><br />
<strong>$result[title]</strong></a>

<if $count=2> </td></tr></if>


In the .php file I'm using $count to count from 0 to 2, then reset to 0... as I go from thread to thread. I have other templates with <if> tags in them and when I do a Show Sourcecode from the browser, I don't see the <if> stuff... just what's resolved from the conditionals. For these, I see the <if> and </if> tags in the code with Show Sourcecode, however the $count is resolved to a number... so its 0=2, 1=2, 2=2, etc... I know I'm doing something stupid here, but can't figure out what it is.

Brian
05-27-2007, 11:29 AM
You need to use <if condition="$count == 0">