Skip to content

Commit

Permalink
Remove "render" layout from list and include the html/layouts/field f…
Browse files Browse the repository at this point in the history
…older
  • Loading branch information
Thomas Hunziker committed May 5, 2018
1 parent 20a2d89 commit 15ea096
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -100,6 +100,7 @@ protected function getInput()
$template_paths = array(
JPath::clean(JPATH_SITE . '/templates/' . $template->element . '/html/layouts/' . $extension . '/field'),
JPath::clean(JPATH_SITE . '/templates/' . $template->element . '/html/layouts/com_fields/field'),
JPath::clean(JPATH_SITE . '/templates/' . $template->element . '/html/layouts/field'),
);

// Add the layout options from the template paths.
Expand All @@ -113,8 +114,10 @@ protected function getInput()

foreach ($files as $i => $file)
{
// Remove layout files that exist in the component folder
if (in_array($file, $component_layouts))
$value = basename($file, '.php');

// Remove the default "render.php" or layout files that exist in the component folder
if ($value === 'render' || in_array($value, $component_layouts))
{
unset($files[$i]);
}
Expand Down

0 comments on commit 15ea096

Please sign in to comment.