Smarty Variable Modifiers |
[eluser]Pascal Kriete[/eluser]
I just started working on a project that needs a templating engine. Nothing fancy, but I wanted some easy modifiers in the view, and the native Parser is just too limited. So I made a Parser extension to allow things such as: Code: We can have some {somevar|lower|capitalize|cat:s}. Code: $data['somevar'] = "VARIABLE"; Will print: Quote:We can have some Variables.Get it here: Wiki Constructive criticism is encouraged ;-) . ps. just realized that cat is broken (only takes words), I'll fix it later. |
Welcome Guest, Not a member yet? Register Sign In |