R
ragtek
Guest
What is the "clean" way, to create templates and use them in the code & at template hooks?
ATM i'm using:
to return the template which i'm adding at an template hook and
to create a "option" for the acp options.
Is this ok, or should i use other classes / methods for this?
thx
ATM i'm using:
PHP:
public static function getFooterTemplate() {
$template = new XenForo_Template_Public('Foo', array());
return $template->render();
}
PHP:
public static function showPhraseOptions(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit) {
return $view->createTemplateObject('ragtek_Foo_Option', array(
'preparedOption' => $preparedOption,
));
}
Is this ok, or should i use other classes / methods for this?
thx