Page 1 of 1

[solved] "If" and "else" in File-Template

Posted: Thu Apr 30, 2009 1:14 pm
by fredlund
Hi,

I need help with an foreach loop in an template,
i want to check what the value in the parent was,
something like:
{if $entry->val1 == $entry->parentvalue}

is that posible ?


{foreach from=$records item=entry}

      {$entry->val1}
      {$entry->val2}
{$entry->val3}
{$entry->val4}
      {$entry->val5}
      {$entry->val6}

{/foreach}

Re: "If" and "else" in File-Template

Posted: Thu Apr 30, 2009 2:58 pm
by alby
fredlund wrote: I need help with an foreach loop in an template,
Smarty doc {if}{else}{/if}

Alby

Re: "If" and "else" in File-Template

Posted: Fri May 01, 2009 12:17 am
by fredlund
tnx alby,

I have solved this problem.



have a nice day!

best regards
Fredlund

Re: "If" and "else" in File-Template

Posted: Fri May 01, 2009 12:49 am
by viebig
great fredlund! you can add [solved] to the post title so other can find this solution too

Regards