R
ragtek
Guest
Anybody found a method, to change automatic the template?
For my own Board, i'm creating a copy of the template, manipulate it and use the manipulated template with overwriting the whole controller method.
For example:
as you see i'm using 'addon_list_ragtek'instead of addon_list
But IMHO that's a very ugly way for this.
A other way would be to try a str_replace of the output, but that's IMHO too much overhead and also very ugly.
Anybody know a better way?
That's why we need something like TMS. PLS PLS Kier
For my own Board, i'm creating a copy of the template, manipulate it and use the manipulated template with overwriting the whole controller method.
For example:
PHP:
class Ragtek_DeveloperTools_ControllerAdmin_AddOn extends XFCP_Ragtek_DeveloperTools_ControllerAdmin_AddOn
{
/**
* overwrite the original index action, so i can use a other template because of the export link
*/
public function actionIndex()
{
$addOnModel = $this->_getAddOnModel();
$viewParams = array(
'addOns' => $addOnModel->getAllAddOns(),
'canAccessDevelopment' => $addOnModel->canAccessAddOnDevelopmentAreas()
);
return $this->responseView('XenForo_ViewAdmin_AddOn_List', 'addon_list_ragtek', $viewParams);
}
public function actionCreateZip()
But IMHO that's a very ugly way for this.
A other way would be to try a str_replace of the output, but that's IMHO too much overhead and also very ugly.
Anybody know a better way?
That's why we need something like TMS. PLS PLS Kier