Page 1 of 1

Menu Layout Overrides - Problem

Posted: 09 Dec 2012, 12:50
by simkea
Hello,

i have a problem! But i dont know, is this a problem from joomla 2.5.8 oder Phocadownload 2.1.8

i try to override the default layout in my template.
i have follow files:
- /mytemplate/html/com_phocadownload/category/default2.php
- /mytemplate/html/com_phocadownload/category/default2.xml (Doku: http://docs.joomla.org/Layout_Overrides ... Menu_Items)

now i can choose this menu-layout in my menutyp:
the build url is: index.php?option=com_phocadownload&view=category&layout=mytemplate:default2&id=xx

if i call this page, i get only the default layout from Phocadownload... but this is not correct.

if i try an modified url : index.php?option=com_phocadownload&view=category&layout=default2&id=xx
the layout override works correct.

can see somebody the problem?

is the setting value from the parameter "&layout=" a part of joomla or phocadownload?

Re: Menu Layout Overrides - Problem

Posted: 09 Dec 2012, 14:33
by simkea
Okay i have fix the problem,

BUT, please insert this Code in the next Update from PhocaDownload

please insert in file:
/components/com_phocadownload/views/category/view.html.php

on line 200:

Code: Select all

// Check for layout override
$active = JFactory::getApplication()->getMenu()->getActive();
if (isset($active->query['layout'])) {
  $this->setLayout($active->query['layout']);
}  
Now the overrides works correct!

Re: Menu Layout Overrides - Problem

Posted: 25 Dec 2012, 13:52
by Jan
Hi, I think, this should be added to the template or into application.php :idea: