I have a view called Vtour. Inside Vtour I have these files:


So default.php is the default view which loads a form that a user can select elements to download.

What I'm trying to do is: create a second view named default2.php inside tmpl/ where I will set the correct php headers for downloading.

What I can't find out is how to redirect there: action="com_iproperty&view=vtour" will always redirect to default.php How can I make it redirect to default2.php?


Probably you just need to add the layout GET parameter to the URL

Also you can redirect in the controller using setRedirect() and JRoute.

$this->setRedirect(JRoute::_('index.php?option=com_iproperty&view=vtour&layout=default2', false), $msg);

Your Answer

