我該如何創建自己的主題標籤/語言或任何其稱之爲shopify正在使用的語言?聰明也有它,對不起,我不知道它叫什麼。shopify中的主題語言
例如shopify如果鍵入
<h1> {{ product.title }} </h1>
- this will print out the products title. what im wondering is how can i create my own language of this type using php?
我該如何創建自己的主題標籤/語言或任何其稱之爲shopify正在使用的語言?聰明也有它,對不起,我不知道它叫什麼。shopify中的主題語言
例如shopify如果鍵入
<h1> {{ product.title }} </h1>
- this will print out the products title. what im wondering is how can i create my own language of this type using php?
這就是所謂的模板語言。 PHP幾乎是一種模板語言,因爲您可以嵌入PHP代碼並將變量放入HTML中。
人們通常在PHP中有*.tpl
文件,他們將其指定爲模板,並且通常不會使用邏輯繁重的代碼,因此它看起來更像上面引用的代碼。
我怎麼可以創建自己更換主題皮膚 標籤/語言或任何其所謂 像shopify使用?
看一看:
我猜這裏:能打電話product.title是最有可能不是tempalte的特點引擎,但你的對象模型(如果有的話)。我想product.title調用對象的方法/字段,它返回標題。
我不太清楚你想達到什麼。如果你使用php,你爲什麼要實現自己的模板語言,而不是僅僅使用Smarty(或者其中一個巨大的替代品)? – middus 2010-08-01 20:30:31