Section Property First
| From: | Kai Kramhoeft | Date: | Sun, 24 Feb 2002 12:07:51 +0000 |
| Subject: | Section Property First | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-2838@lists.php.net to get a copy of this message | ||
Hello!
I am running into a problem using "section property first". It doesnt seem to work in my
source.
I am using Smarty 1.4.6. If it is the first iteration I want to print out something different than
its another iteration.
Here is my source:
---------------------------------------------------------------------------------------------------------------------------------------------------------------
{section name=listing loop=$rows} <-- LOOK HERE
<tr>
<td width="50%" align="center">{$rows[listing].title}</td>
<td width="12%" align="center"><a
href="link_edit.php?action=edit&rid={$rid}&lid={$rows[listing].id}"> Editieren
</a> </td>
<td width="12%" align="center"><a
href="link_delete.php?action=delete&rid={$rid}&lid={$rows[listing].id}">
Löschen </a></td>
{if $smarty.section.listing.first} <--- LOOK HERE
<td width="12%" align="center"><a
href="link_show.php?action=up&rid={$rid}&lid={$rows[listing].id}&position={$rows[listing].position}">
UP </a></td>
{else}
<td> </td>
{/if}
<td width="12%" align="center"><a
href="link_show.php?action=down&rid={$rid}&lid={$rows[listing].id}&position={$rows[listing].position}">
DOWN </a></td>
</tr>
{/section}
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Kind Regards,
Kai
________________________________________________
Agentpark - Ihr Partner fuer professionelle Java Loesungen
________________________________________________
Kai Kramhoeft kai@agentpark.de
Hoekerstr. 7 http://www.agentpark.de
27568 Bremerhaven
Tel.: 0471-9515068