Ciao!
Ok scusami.
Allora la chiamata alla view è questa:
<td>
<a href="<?php echo JRoute::_('index.php?option=com_lawyer&view=positionUser2&id=' . $item->id . "&title=" . $item->title); ?>">
<?php echo JText::_('COM_LAWYER_POSITION_MANAGE_NOTIFICATION') ?> </a>
</td>
e questo è il file della view sta sotto views/positionUser2/view.html.php
<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla view library
jimport('joomla.application.component.view');
/**
* LawyerViewPosition View
*/
class LawyerViewPositionUser2 extends JView
{
/**
* Position view display method
* @return void
*/
function display($tpl = null)
{
//Qui avevo provato anche con questa linea di codie che però non viene richiamata.
//echo "ho raggiunto la view: positionUser2";exit;
$id = JRequest::getVar('id','0');
$model = $this ->getModel();
$items = $model->getPositionUser($id);
// Get data from the model
$pagination = $this->get('Pagination');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode('<br />', $errors));
return false;
}
// Assign data to the view
$this->items = $items;
$this->pagination = $pagination;
// Set the toolbar
$this->addToolBar();
// Display the template
parent::display($tpl);
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
$app = JFactory::getApplication();
JToolBarHelper::title(JText::_('COM_LAWYER_POSIZIONMANAGER').': '.$app->getUserState('title_position_lawyer',''), 'positionUsers');
}
}
L'errore che mi da l'installazione di Joomla è:
500 - Si è verificato un errore. View non trovato [name, type, prefix]: positionUser2, html, lawyerView
Dove potrei provare il componente?
grazie,
Cristian