Looking For A Good HTML Templater for PHP [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
开发者_StackOverflow中文版 Improve this questionThat's an HTML templater, not a php templater, not java or whatever.
I am looking for something like HAML for PHP. I tried the 2 projects for PHP, PHAML and PHPHaml both of which are suffering from serious bugs.
Do you know of any good html templater out there, preferably for PHP?
EDIT I''m looking for something that can turn this
<h1>Heading</h1>
<p>entry</p>
<blockquote>quote</blockquote>
to something like this
h1 : heading
p : entry
blockquote : quote
something like what phphaml does
Why don't you look at textile?
http://textism.com/tools/textile/
Look at the example syntax on the right hand side, here is an example...
h2{color:green}. This is a title
h3. This is a subhead
p{color:red}. This is some text of dubious character. Isn't the use of "quotes" just lazy writing -- and theft of 'intellectual property' besides? I think the time has come to see a block quote.
Converts to:
<h2 style="color:green;">This is a title</h2>
<h3>This is a subhead</h3>
<p style="color:red;">This is some text of dubious character. Isn’t the use of “quotes” just lazy writing—and theft of ‘intellectual property’ besides? I think the time has come to see a block quote.</p>
There are other examples at the bottom of the right sidebar.
Try http://haml-to-php.com/ which is a complete rewrite of phamlp based on a minimal parser engine.
You can use this: http://github.com/mo-zag/watcher. There's a guide on how to add PHP code inside Ruby Haml files. This watcher will watch the files and save them into your given folder. It's quite simple to set up, too. You don't need to use any PHP template parsers, you just use the native Haml and Sass in Ruby.
精彩评论