RE: Section Property First

From: Date: Sun, 24 Feb 2002 18:33:23 +0000
Subject: RE: Section Property First
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2839@lists.php.net to get a copy of this message
I don't think the {$smarty.section.foo.bar} syntax is supported in 1.4.6. Upgrade Smarty, or use {if %listing.first%} -----Original Message----- From: Kai Kramhoeft [mailto:kai@agentpark.de] Sent: Sunday, February 24, 2002 6:08 AM To: smarty@lists.ispi.net Subject: [smarty] Section Property First 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&ouml;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>&nbsp;</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 --- You are currently subscribed to smarty as: monte@ispi.net To unsubscribe send a blank email to $subst('Email.Unsub') Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/

« previous php.smarty.general (#2839) next »