Page 1 of 1

ignore foreach loop in specific ID

Posted: Tue May 31, 2011 9:29 am
by Recon
Hi, I don't know where this question should be wrote but here it is.

I am using CGblog to create product list. Every product have picture and two links. These two links are for jquery's dialog box, which background and content are loaded from div's. I am generating those link like this :

Code: Select all

<div id="tuotteetteksti">
{eval var=$entry->summary}
<table>
<tr>
<td>
<a name="modal" href="#dialog{eval var=$field->value}"><img src="uploads/images/ravintosisaltopainike.png" alt="" /></a>
</td>
<td>
<a name="modal" href="#dialog{eval var=$field->value}link2"><img src="uploads/images/Reseptitpainike.jpg" alt="" /></a>
</td>
</tr>
</table>
</div><div class="clear"></div>
</div>
<div id="tuotteetvali">
</div>
and it looks like this: http://whm01.louhi.net/~soyappet/index. ... ustuotteet


OK, now I want to take out those two links from the first row ("Perustuotteet"). Can I tell to foreach loop somehow to ignore first run where it creates those links? Every blog's article have ID number and it is generated whit this #dialog{eval var=$field->value} Can I use perustuotteet's ID numeber somehow?


Thank You!

Recon

Re: ignore foreach loop in specific ID

Posted: Tue May 31, 2011 11:02 am
by uniqu3
Maybe this can help you
http://www.smarty.net/docsv2/en/languag ... erty.first
or look at itteration.