Как многие из вас знают, контроллер в Joomla 2.5 изменен сСвязывание с новой Joomla 2.5 Controller
// Create the controller
$classname = 'mycomponentController'.$controller;
$controller = new $classname();
// Perform the Request task
$controller->execute(JRequest::getVar('task'));
// Redirect if set by the controller
$controller->redirect();
к чему-то вдоль линий
// Get an instance of the controller prefixed by the component
$controller = JController::getInstance('mycomponent');
// Perform the Request task
$controller->execute(JRequest::getCmd('task'));
// Redirect if set by the controller
$controller->redirect();
Сейчас в Joomla 1.5, а также используя таблицу, вы можете запустить задачу, запустив ссылку
index.php?option=com_mycomponent&controller=specificcontroller&task=randomtask
Однако этот стиль ссылки не работает с ne w controller - кто-нибудь знает, как отформатировать эту ссылку в Joomla 2.5, если вы используете новый контроллер?
Спасибо! Требуется ли view = viewname? –
Нет, это не так ... – Elin
Thankyou :) очень благодарен –