Hi,
I'm studying CMSMS to see how it works - particularly how it uses Smarty. I found a prefilter called prefilter_precompilefunc.php that Smarty loads. This has a function smarty_cms_prefilter_precompilefunc which is called before a template is compiled passing the source. The function has a case statement depending on the value of $smarty->_current_file before a ':'. The cases are
'content' ,'globalcontent', and 'template'. I'm using 1.4.1 and tracing entry to the function it does not seem ever to call with 'template' though it does call with 'tpl_body', 'tpl_top' and 'tpl_head'. So any module functions TemplatePreCompile don't get called. Is this a bug or is it a deliberate move?
Thanks for any help,
Peter
smarty_cms_prefilter_precompilefunc
Re: smarty_cms_prefilter_precompilefunc
This only gets called during a compilation of the template after it's changed. Are you checking right after you add/edit a page template? If it's not getting called at all, then I would have to think it's a bug.
Re: smarty_cms_prefilter_precompilefunc
I deleted everything from templates_c so presumably it should be compiled.
Other calls with $smarty->_current_file is 'content:...' or 'globalcontent:' are there as expected.
-- Peter
Code: Select all
smarty_cms_prefilter_precompilefunc 29 in/cmsmadesimple/plugins/prefilter.precompilefunc.php
$result[0] for case is tpl_body
$smarty->_current_file: tpl_body:17
Nothing done
Other calls with $smarty->_current_file is 'content:...' or 'globalcontent:' are there as expected.
-- Peter