By: bunak
Date: 2011-03-22
Time: 13:03
|
AfterLoadTemplate doesnt work in special occassion - SOLVED
I wrote small plugin which get variables and blocks from loaded template. It is loaded automatically after new TBS creation. Main action is bound with AfterLoadTemplate action.
But....
When teplate is loded by LoadTemplate from file i.e. $TBS->LoadTemplate('file.tpl', FALSE) it works
When template is filled into Source i.e. $TBS->Source = $templatecontent; and after that $TBS->LoadTemplate('', FALSE) is running, then function bound with AfterLoadTemplate action doesnt work (it seems like it is not running beacause test print in this function doesn'n print anything).
Please help me, where is problem. Thanks Bunak
I SOLVED IT. LoadTemplate MUST BE RUN WITH LoadTemplate(null, FALSE)
|