Registering Smarty filters

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
kristoftorfs
Forum Members
Forum Members
Posts: 11
Joined: Tue Jul 08, 2014 1:15 pm
Location: Belgium

Registering Smarty filters

Post by kristoftorfs »

Hi, I want to register a Smarty (pre)filter for my module. For regular Smarty plugins I just call RegisterSmartyPlugin in my module Install method, but this doesn't seem to work for filters.

Where would be the best place to (persistently) register the filter and how should I go about this?

Do note that I do not want to use the main plugins directory as I want to keep my filter with the module.
kristoftorfs
Forum Members
Forum Members
Posts: 11
Joined: Tue Jul 08, 2014 1:15 pm
Location: Belgium

Re: Registering Smarty filters

Post by kristoftorfs »

Found a work-around by using the SmartyPreCompile event.

However, I would like to get some feedback to tell me if this is actually the right way to do this?
Post Reply

Return to “Developers Discussion”