I have problem with Joomla layouts in my component..There must be something bad with file/class name convention.. I was trying to ask on Joomla developer forum, but noone answered.. So I am getting this error.. 500 - View not found [name, type, prefix]: PostToBank,,postToBankView The view is in views/postTobank/view.php and name is postToBankViewPostToBank In my controllers/controller.php file I have class named PaymentController which contains this part开发者_开发百科 of code.
$view = $this->getView('PostToBank','','postToBankView');
$this->getModel("Payment")->savePaymentData($data);
foreach ($data as $key => $value) {
$view->assignRef($key, $value);
}
$view->setLayout('postTobank');
$view->display();
my view.php file looks like this
class postToBankViewPostToBank extends JView{
function display($tpl=null){
//display set template
parent::display($tpl);
}
}
on attached image is full folder structure of my component.. Please whats wrong with this?ThanksJoomla uses a naming conventions and you are not following them. Refer to http://docs.joomla.org/File_Structure_and_Naming_Conventions
Also, your views should be view.html.php
and then you do not need to call setView
.
FYI: this is where the error is coming from. Refer to this: http://docs.joomla.org/API16:JController/getView, even though it is 1.6 doc it is same in 1.5
Look though this tutorial and adopt regular conventions: http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1
精彩评论