RE: Section Property First
| From: | Kai Kramhoeft | Date: | Sun, 24 Feb 2002 13:14:06 +0000 |
| Subject: | RE: Section Property First | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2840@lists.php.net to get a copy of this message | ||
Hello Monte,
{if %listing.first%} works fine. Thank you very much! Is this syntax supported in all Smarty
versions ?
I am using it as {if !(%listing.first%)} now.
Kind Regards, Kai.
----- Original Message -----
From: Monte Ohrt
To: smarty@lists.ispi.net
Sent: Sunday, February 24, 2002 7:33 PM
Subject: [smarty] RE: Section Property First
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ö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
---
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/
---
You are currently subscribed to smarty as: kai@agentpark.de
To unsubscribe send a blank email to $subst('Email.Unsub')
Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/