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


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:

<li>{title} - {description} - {image} - {id}</li>

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

from within the view? similar to Smarty?

Found my answer after an extensive search in the forums:

Saved me from using Smarty (I hate it!)

[eluser]The Wizard[/eluser]
ive used smarty in all my other projects,
i think ill use it here too Smile

its cool, why hate it?

Theme © iAndrew 2016 - Forum software by © MyBB