2010-04-15 35 views
0

這是一個HTML模板,而不是一個PHP templater,而不是Java或其他。尋找一個好的HTML模板的PHP

我正在尋找類似HAML for PHP的東西。我嘗試了PHP,PHAML和PHPHaml的兩個項目,這兩個項目都有嚴重的錯誤。

你知道任何優秀的html模板嗎,最好是PHP嗎?

編輯 I''m尋找的東西,可以把這個

<h1>Heading</h1> 
<p>entry</p> 
<blockquote>quote</blockquote> 

到這樣的事情

h1 : heading 
p : entry 
blockquote : quote 

像什麼phphaml確實

+0

如果我理解正確,您需要PHP的模板引擎? Smarty也許? http://www.smarty.net/ – 2010-04-15 08:43:35

+0

對不起,smarty不是我的選擇:( – yretuta 2010-04-15 08:47:49

回答

0

你爲什麼不看看紡織?

http://textism.com/tools/textile/

看右手邊的實例語法中,這裏有一個例子...

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. 

轉換爲:

<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&#8217;t the use of &#8220;quotes&#8221; just lazy writing&#8212;and theft of &#8216;intellectual property&#8217; besides? I think the time has come to see a block quote.</p> 

還有另一例子右側邊欄的底部。

+0

這是如此的好!他們有一個解析器,我可以使用PHP嗎?我猜不是:( – yretuta 2010-04-15 11:00:43

+0

他們這樣做,一個朋友一直在使用它來構建一個基於PHP的MicroCMS,他的buidling.Here的主頁(http://textile.thresholdstate.com/),這裏是PHP類的zip(http://textile.thresholdstate.com/file_download/ 1/textile-2.0.0.zip) – 2010-04-15 11:40:10

-1

您可以使用此:http://github.com/mo-zag/watcher。有關於如何在Ruby Haml文件中添加PHP代碼的指南。該觀察者將觀察這些文件並將它們保存到您的給定文件夾中。設置也很簡單。您不需要使用任何PHP模板解析器,只需在Ruby中使用本地Haml和Sass。