|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ronsen Smarty Rookie
Joined: 07 Jun 2003 Posts: 13 Location: Baden/Wien Austria
|
Posted: Tue Jun 24, 2003 11:51 pm Post subject: need help with if elseif else |
|
|
I try to construct this tpl to make one-raw/one-col for title and on-raw/tow-col for image and text.
Could any of you help me, I play around with positioning if before '<dt>'
after, with elseif and else, but every if, elseif and else result in a loop.
Code: |
<table width="70%" height="0" border="0" align="center" cellpadding=4 cellspacing=5 div id="tablemess">
{foreach name=nr item=news_titel from=$results}
{foreach key=schluessel item=wert from=$news_titel}
<tr>
<td colspan="2"> {if $schluessel eq news_titel} <div id="titel">{$wert}</div>{/if}
</td>
</tr>
<tr>
<td width="*" valign="top">{if $schluessel eq news_image}<img src="../image/{$wert}">{/if}
</td>
<td width="*">{if $schluessel eq news_text}<div id="text">{$wert}</div>{/if}
</td>
</tr>
{/foreach}
{/foreach}
</table>
|
thank you in advance
Ron |
|
Back to top |
|
ronsen Smarty Rookie
Joined: 07 Jun 2003 Posts: 13 Location: Baden/Wien Austria
|
Posted: Wed Jun 25, 2003 12:11 pm Post subject: |
|
|
changed to
{section name=nr loop=$results}
ron |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|