Codeigniter Templating (if / else if) in loop
Regarding the documentation, I don't think you can build conditions with the standard CI's Template Parser Class.
You can loop through arrays like you did with {bond} [...] {/bond}
, but I don't think you can write {if}
conditions.
Like the doc says :
The Template Parser Class enables you to parse pseudo-variables contained within your view files. It can parse simple variables or variable tag pairs.
[...]
Also Note: The Template Parser Class is not a full-blown template parsing solution. We've kept it very lean on purpose in order to maintain maximum performance.