Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Will there be a Thymeleaf in PHP?

When I use Java, my favorate Template Engine is Thymeleaf [http://www.thymeleaf.org/], it is really a great Template Engine and it is the most great template engine I've met. the great idea of thymeleaf is to use the namespace of attribute to work with the tempate, and make the tempate staticly view-able (run the code is not necessary )

with dynamic style sheet link you can code like that:

<link ret="stylesheet" href="../../../css.css" th:href="${site_url}/static/css.css">

when you preview it staticly, the ../../../css.css will be loaded and the final look you will see. when you run it, the href attribute will be relpaced with the th:href. I did think that is a really designer friendly template engine.

all the code must to be placed in the attribute. that will not cause the browser parse failed (by staticly preview)

<span th:text="${body}">Hello World!</span>

the output will be

<span>The Dynamic Body</span>

Is there any thought about a PHP implimention of Thymeleaf ?

There are plenty of template engines in PHP (including PHP itself). Here is a list that seems to cover everything that isn't volt:

http://www.webresourcesdepot.com/19-promising-php-template-engines/

If you really need the Thymeleaf syntax, then you might have to prepare for disappointment.



8.6k
Accepted
answer

There are plenty of template engines in PHP (including PHP itself). Here is a list that seems to cover everything that isn't volt:

http://www.webresourcesdepot.com/19-promising-php-template-engines/

If you really need the Thymeleaf syntax, then you might have to prepare for disappointment.

Very appreciateļ¼ I just found that the PHPTAL has some features like thymeleaf. may i cna try the PHPTAL[http://phptal.org/]



8.6k

There are plenty of template engines in PHP (including PHP itself). Here is a list that seems to cover everything that isn't volt:

http://www.webresourcesdepot.com/19-promising-php-template-engines/

If you really need the Thymeleaf syntax, then you might have to prepare for disappointment.

And also the HTMLTemplateFlexy