こんにちは皆さん私はウェブサイトにjoomla2.5を使用しています
バックエンドのデータベースに商品を挿入するコンポーネントを作成し、この商品をフロントエンドに表示したい
type = 1の製品を表示するために、このリンクがビューにあります。
<div class="col2"><a href="<?php echo $this->baseurl ?>/index.php/hardware/integrados">Productos</a></div>
コンポーネントcontroller.phpのフロントエンドにこれがあります
class HardwareController extends JController
function integrados(){
$model = &$this->getModel(JRequest::getCmd('view'));
$view = &$this->getView(JRequest::getCmd('view'), 'html');
$view->setModel($model, true);
$view->hardwareIntegrado();
}
私のモデルでは
class HardwareModelHardwares extends JModelList
function getIntegrados(){
$db=& JFactory::getDBO();
$query= "SELECT *
FROM ".$db->nameQuote('#__hardware')."
WHERE ".$db->nameQuote('tipo')."=".$db->quote("1").";";
$db->setQuery( $query);
$restaurantes=$db->loadObjectList();
JRequest::setVar('hard', $restaurantes);
return $restaurantes;
}
そして私のview.html.phpで私はこれを持っています
public function hardwareIntegrado(){
$this->assignRef('pagination', $this->get('pagination'));
$this->assignRef('hardware', $this->get('integrados'));
$this->assignRef('list', $this->get('list'));
parent::display();
}
リンクをクリックすると、このエラーが発生します
500 - View not found [name, type, prefix]: hardware, html, hardwareView
何か案が!