Skip to content

Commit b6bf701

Browse files
dieudonnetimmawilsonge
authored andcommitted
[4.0] Fixed the translation of the view type in menuitem (#21324)
* Fixed the path to the XML-File of a layout in a view of a component. * Add the path to layout schema for Joomla! 3 component * fixed coding standard * fixed more coding standard * fixed the path to layout shema for old Joomla! version * Codestyle
1 parent 470d38d commit b6bf701

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

administrator/components/com_menus/View/Items/HtmlView.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,21 @@ public function display($tpl = null)
210210
else
211211
{
212212
// Get XML file from component folder for standard layouts
213-
$file = JPATH_SITE . '/components/' . $item->componentname . '/views/' . $vars['view'] . '/tmpl/' . $vars['layout'] . '.xml';
214-
213+
$file = JPATH_SITE . '/components/' . $item->componentname . '/tmpl/' . $vars['view']
214+
. '/' . $vars['layout'] . '.xml';
215+
215216
if (!file_exists($file))
216217
{
217-
$file = JPATH_SITE . '/components/' . $item->componentname . '/view/' . $vars['view'] . '/tmpl/' . $vars['layout'] . '.xml';
218+
$file = JPATH_SITE . '/components/' . $item->componentname . '/views/'
219+
. $vars['view'] . '/tmpl/' . $vars['layout'] . '.xml';
220+
221+
if (!file_exists($file))
222+
{
223+
$file = JPATH_SITE . '/components/' . $item->componentname . '/view/'
224+
. $vars['view'] . '/tmpl/' . $vars['layout'] . '.xml';
225+
}
218226
}
227+
219228
}
220229

221230
if (is_file($file) && $xml = simplexml_load_file($file))

0 commit comments

Comments
 (0)