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

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
fredlund
New Member
New Member
Posts: 3
Joined: Thu Apr 30, 2009 12:52 pm

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

Post 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}
Last edited by fredlund on Thu Jun 04, 2009 12:11 am, edited 1 time in total.
alby

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

Post by alby »

fredlund wrote: I need help with an foreach loop in an template,
Smarty doc {if}{else}{/if}

Alby
fredlund
New Member
New Member
Posts: 3
Joined: Thu Apr 30, 2009 12:52 pm

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

Post by fredlund »

tnx alby,

I have solved this problem.



have a nice day!

best regards
Fredlund
viebig

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

Post by viebig »

great fredlund! you can add [solved] to the post title so other can find this solution too

Regards
Post Reply

Return to “Developers Discussion”