Which template system is more suitable for Yii Framework?

Thank you for reading my post, I beg for your help: which template system is more suitable for Yii?

This is the description: My web team has 4 developer and started to develop our site about 2 months ago.Until now, we use the default template system provided by Yii, but it’s very inconvenient for our UI designer who is not familiar with PHP and Yii.So we decide to use one template system, but I am not sure about which one to choose. Smarty is very famous, and Twig also seems to be perfect.Is there anyone who can give some advices?

that’s an old discussion with pros & cons

in the end YOU (or your ui-designer?) have to decide, which one you choose, YOU have to work with

nevertheless a few links about this topic you can find here: http://blog.mbischof.de/diskussionen-zu-php-template-engines

As above, I would add though that if there’s a common templating engine people are familiar with that would make some sense, unless it’s old and not maintained. In my opinion though, all the template engines have syntax that you have to learn and some of these are no more simple than straight PHP anyway. Just get them to learn the PHP they need to write the views and don’t get hung up over the fact it’s a programming language, they don’t need to learn it all.

So you dont feel like learning Yii templating system, but you feel like learning other templating system with all necessary integration tweaks… Hmmm, interesting…

I think this is a lot easier to work with for a designer than PHP:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html lang="en">

    <head>

      <title>My Webpage</title>

    </head>

  <body>

  <ul id="navigation">

    {% for item in navigation %}

      <li>

        <a href="{{ item.href }}">{{ item.caption }}</a>

      </li>

    {% endfor %}

  </ul>

  <h1>My Webpage</h1>

    {{ a_variable }}

  </body>

</html>

So may I suggest Twig?

Link:

http://www.yiiframework.com/extension/twig-view-renderer/