Skip to content

Conversation

@fengliu222
Copy link

允许用户在渲染模板之前调用tppl.helper方法注册helper,在模板中调用helper,更加方便的处理模板中得元素。

对项目做了以下修改:

1.增加tppl.helper方法
2.增加[: variable | helperName:"format" :]语法
3.修改了README文档

性能方面,通过你提供的测试CASE,发现并未有太大波动。具体的指标,你可以再仔细测下。

@jojoin
Copy link
Owner

jojoin commented Apr 21, 2016

@fengliu222 非常感谢你的提交,看起来功能的确强大了很多。
但是,tppl的定位是在用于ajax加载时在前端快速插入html,而并不是作为一个后端大而全的模板引擎,后端的引擎目前已经有优秀的解决方案。
为了保持 tppl 的特色,目前我并不打算合并你的 push,原因如上。如果你感兴趣,可以将 tppl 打造成一个后端的 Heavy Template。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants