开发者

Is there a common intersection of Smarty and Template Toolkit?

In some projects I have to work with Perl and Template Toolkit and in others with PHP and Smarty templates. Can you somehow configure both to have a common subset of each language, so you can use the same templates in smarty and in template toolkit? Sure there are language properties which cannot be mapped to the other, but if there is a common intersection, you could limit yourself to this part. A useful addon would be a validator that checks for absence of language-specific template features.

P.S:开发者_如何学JAVA A pointer to some template language that is supported in both Perl and PHP, like Template Attribute Language, but with syntax similar to Smarty and Template Toolkit, would also be helpful.


I now found XSlate, a template engine for Perl that can handle multiple syntaxes. With Text::Clevery you can use a large subset of Smarty syntax, so templates can be shared between Perl and PHP. So a better move from Template Toolkit to XSlate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜