4
我正在使用的Joomla比視圖的自己的模式不同的模式,即由控制器分配給它,就像類似於它的名字:如何的Joomla MVC組件中使用多種模型
$view->setModel($this->getModel('user'));
現在,我怎麼使用它方法getSingleUser($ user_id)在視圖中。在的Joomla文檔中的一個例子,它使用的是一些這樣的事:
$this->get("data1","model2");
所以我認爲數據1是MODEL2方法的名字嗎?如果是這樣,那麼我怎麼能通過在我的情況下是userid的參數。我知道很多joomla開發者都這麼做很容易,但我是各種開發者的傑作,也是joomla的新手,所以我希望你們能告訴我。
您的標題並沒有真正符合您的問題。您是否試圖在視圖中加載多個模型或試圖更改加載的模型? – udjamaflip
我正在嘗試加載多個模型,並且在視圖中使用了與默認不同的模型 – Hafiz