mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-02 22:45:02 +03:00
возможность в хуках шаблонов передавать параметры
This commit is contained in:
parent
0fc43f914f
commit
23199c0f64
|
@ -29,8 +29,9 @@ function smarty_function_hook($aParams,&$oSmarty) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sHookName='template_'.strtolower($aParams['run']);
|
$sHookName='template_'.strtolower($aParams['run']);
|
||||||
$aResultHook=Engine::getInstance()->Hook_Run($sHookName);
|
unset($aParams['run']);
|
||||||
|
$aResultHook=Engine::getInstance()->Hook_Run($sHookName,$aParams);
|
||||||
if (array_key_exists('template_result',$aResultHook)) {
|
if (array_key_exists('template_result',$aResultHook)) {
|
||||||
return join('',$aResultHook['template_result']);
|
return join('',$aResultHook['template_result']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue