I love smarty templates so much. We can write simple templates to complex templates very easy in smarty.

Simple Templates

HTML:
  1. {$username}
  2. {if $username}
  3. {$username}
  4. {/if}

Complex Templates

HTML:
  1. {foreach from=$arr_pfacility item=pfacility_text key=pfacility_id}
  2. {assign var="id_selected" value=false}
  3. {foreach from=$smarty.post.fp_pfacility item=sel_item}
  4. {if $sel_item==$pfacility_id}
  5. {assign var="id_selected" value=true}
  6. {/if}
  7. {/foreach}
  8. <td width="10">
  9. {if $id_selected}
  10. <input type="checkbox" name="fp_pfacility[]" value="{$pfacility_id}" checked>
  11. {else}
  12. <input type="checkbox" name="fp_pfacility[]" value="{$pfacility_id}">
  13. {/if}
  14. </td>
  15. <td>{$pfacility_text.name}</td>
  16. </tr>
  17. {/foreach}

I am working on to load smarty as a plugin to wordpress. if someone interested in making the templates for their blog admin plugins they can do :-D

Download a sample implementation here