【发布时间】:2013-04-27 23:49:04
【问题描述】:
我很困惑如何在 joomla 2.5 中投影模型结果
我有正在初始化模型的控制器
class FrontpageMyComponentControllerItem extends JControllerLegacy
{
private $id;
public function display($cachable = false, $urlparams = array())
{
// Initialise variables.
$jinput = JFactory::getApplication()->input;
$this->id = $jinput->get('id');
$cachable = true;
$model = $this->getModel('item');
$result_in_view = $model->Item('23'); //$id what I get
// Set the default view name and format from the Request.
$viewName = $jinput->get('view', 'item');
$jinput->set('view', $viewName);
return parent::display($cachable, $safeurlparams);
}
}
现在如何在我的视图中显示结果?
【问题讨论】:
标签: oop model-view-controller joomla