Before explaining how to use tmd_tpl, I want to first talk about why we need to reinvent the wheel.
Then we have to start with what contributions the so-called PHP template engines in the world have made for everyone.
When talking about template engines in the PHP world, it is inevitable to use Smarty.
This extremely silly but slightly official template engine,
If there were not passionate young people like me with a sense of justice and innovative spirit to stand up,
I don’t know how many teenagers it will continue to poison those who are in their prime and full of beautiful fantasies about PHP.
1. Grammar
Do you really think that artists have learned the syntax {foreach key=key item=item from=$contact}?
But can't learn $item) { ?> ?
And {if $name eq "Fred" or $name eq "Wilma"}
than again How excellent is it?
First of all, I am always skeptical about artists learning Smarty syntax. At least in all my years of working, I have never met anyone who knows Smarty syntax.
And even if the artist is willing to learn, why don't you teach him the authentic PHP syntax, but teach him a "Smarty language" that you can't even figure out yourself?
2.Visualization
When the page is handed over from the artist to you, then you add that disgusting Smarty code to those perfect web pages,
Then in Dreamweaver, have you seriously looked at how ugly those pages have become?
Are the images still visible? Is the CSS still there? Not to mention include. And what about when you want to modify it? Can you still recognize it at a glance?
If these cannot be solved, how can those so-called template engines be worthy of the word "powerful"?
3 I won’t go into too many details. Here I just take Smarty as an example. It should not be difficult to find that other template engines are similar.
They are all busy inventing their own template languages, while avoiding the problems that really need to be solved.
Do you understand now that the so-called template engines and the so-called power are all liars?
In the dead of night, I woke up countless times and felt that my burden was heavier just because I couldn't tell you this cruel fact.
So I was heartbroken and heartbroken, and took time out of my busy schedule to write this real template engine named tmd_tpl.
Although it may not be strong yet, being strong is inevitable in the future.