• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Alter Compiled Templates...

digitalpoint

Well-known member
#1
Maybe I'm just missing it, but is there a way to hook into XenForo_Template_Compiler_Admin::compileParsed() ?

Basically I'd rather alter a compiled template vs. doing a find/replace every time a template is rendered (more efficient).
 

xfrocks

Well-known member
#3
You can extends the DataWriter (XenForo_DataWriter_Template) then hook yourself into the set() method, wait until 'template_parsed' is set and do your job. Anyway, I don't recommend this because compiled template is way too complicated to alter. Also, if your add-on do this, you will have to trigger a template save for each template you change. Is it worth it?