Use if and iteration in CMP controller with tpl

I’m building a simple CMP where my client can add/edit products in the manager. I’m building a controller to edit products and I use $this->fetchTemplate(dirname(__DIR__) . "/tpl/productedit.tpl"); to show a html-form to fill in. I can pass values to this tpl with setPlaceholders, but I was wondering if there’s a way to use ‘if’ statements and iterations (to go through and array) in this tpl. I can fetch the array hardcoded, but it would be better if I could iterate this: <td> <input type="text" name="veldnaam[]" value="{$velden.0.veldnaam}" class="form-control"/> </td>

Any ideas?
Thanks, Steffan

This is a Smarty template, so you should be able to use {if},{elseif},{else} and {foreach}.

Ah, ofcourse. Didn’t realize it was a smarty template, thanks for the quick reply! Works perfectly!