|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
robb Smarty n00b
Joined: 26 Dec 2018 Posts: 1
|
Posted: Wed Dec 26, 2018 2:01 pm Post subject: How to mutate smarty variable before it is rendered ? |
|
|
Maybe you fine folks can help me here.
I'm working on a prestashop module and I would like to incorporate some "shortcode" functionality, unfortunately prestashop doesn't offer any good hooks for this stuff or callback functions before the content is echo'ed on the page. I was hoping smarty could help me out here.
I found something like registerFilter() that could be what I need but it doesn't seem to work at all, it does this weird thing where it outputs the actual smarty syntax when I clear the cache the first time, but then it just doesn't do anything, its ignoring my filter completely.
Has anyone got anything like this done? Or its simply something that smarty doesn't support yet? Thanks y'all. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Dec 27, 2018 10:36 am Post subject: |
|
|
Filters are intended for template rewriting, before they are compiled.
I would suggest reading the domcumentation, with examples, more carefully. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|