Welcome Guest, Not a member yet? Register   Sign In
IF statement with a template
#1

[eluser]webshark[/eluser]
Hi,

My views are parsed using the CodeIgniter built in template parser and I am displaying a list of items via a loop (data pulled from database):

My views code:

Code:
{found_content}
<li>{title} - {description} - {image} - {id}</li>
{/found_content}

My question can I run an IF statement using the parsed vars, something like
{if $id == 1}
do something here
{else}
do something else
{/if}

from within the view? similar to Smarty?


Messages In This Thread
IF statement with a template - by El Forum - 05-25-2008, 08:46 AM
IF statement with a template - by El Forum - 05-25-2008, 09:21 AM
IF statement with a template - by El Forum - 08-08-2008, 05:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB