i had this function in my controller, it's a copy of edit function
function printy()
{
//Check Component ACL
if (!$this->can(array('core.edit', 'core.edit.own'), JText::_("PRINT")))
return;
$model = $this->getModel('batenergiepartitem');
$item = $model->getItem();
//Check Item ACL
if (!$this->can('access-edit', JText::_("PRINT"), $item->params))
return;
$vars = array();
$layout = JRequest::getVar( 'layout');
switch($layout)
{
case 'default':
JRequest::setVar( 'view' , 'batenergiepartitem');
JRequest::setVar( 'layout', 'batiment' );
break;
default:
JRequest::setVar( 'view' , 'batenergiepartitem');
JRequest::setVar( 'layout', 'batiment' );
break;
}
$this->setRedirect(BatenergieHelper::urlRequest($vars));
}
i hab a button print in my toolbar
bur then i click on that -> white page with only site header !? the url is correct with "/nw_wiew/id"
this view require a file fpdf that i put in the same directory ...
LJ