Menu Layout Overrides - Problem

Phoca Download - download manager
simkea
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 09 Dec 2012, 12:35
Location: Marburg
Contact:

Menu Layout Overrides - Problem

Post 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?
simkea
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 09 Dec 2012, 12:35
Location: Marburg
Contact:

Re: Menu Layout Overrides - Problem

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48595
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Menu Layout Overrides - Problem

Post by Jan »

Hi, I think, this should be added to the template or into application.php :idea:
If you find Phoca extensions useful, please support the project
Post Reply