Skip to content
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions administrator/components/com_menus/View/Items/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,18 @@ public function display($tpl = null)
else
{
// Get XML file from component folder for standard layouts
$file = JPATH_SITE . '/components/' . $item->componentname . '/views/' . $vars['view'] . '/tmpl/' . $vars['layout'] . '.xml';

$file = JPATH_SITE . '/components/' . $item->componentname . '/tmpl/' . $vars['view']
. '/' . $vars['layout'] . '.xml';

if (!file_exists($file))
{
$file = JPATH_SITE . '/components/' . $item->componentname . '/view/' . $vars['view'] . '/tmpl/' . $vars['layout'] . '.xml';
$file = JPATH_SITE . '/components/' . $item->componentname . '/views/'
. $vars['view'] . '/tmpl/' . $vars['layout'] . '.xml';
}
else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make this an if file_exists check too (otherwise we'll try and parse a file that doesn't exist none of the 3 exist)

{
$file = JPATH_SITE . '/components/' . $item->componentname . '/view/'
. $vars['view'] . '/tmpl/' . $vars['layout'] . '.xml';
}
}

Expand Down