IF statement with a template |
[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} 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?
[eluser]webshark[/eluser]
Found my answer after an extensive search in the forums: http://ellislab.com/forums/viewthread/68878/#341795 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 its cool, why hate it? |
Welcome Guest, Not a member yet? Register Sign In |