diff --git a/components/com_content/helpers/route.php b/components/com_content/helpers/route.php index 822d59dc54634..5912018b1d6fa 100644 --- a/components/com_content/helpers/route.php +++ b/components/com_content/helpers/route.php @@ -79,10 +79,12 @@ public static function getCategoryRoute($catid, $language = 0) $link .= '&lang=' . $language; } - $jinput = JFactory::getApplication()->input; - $layout = $jinput->get('layout'); + $app = JFactory::getApplication(); + $component = $app->input->get('option', '', 'CMD'); + $view = $app->input->get('view', '', 'CMD'); + $layout = $app->input->get('layout', '', 'string'); - if ($layout !== '') + if ($component === 'com_content' && $view === 'category' && $layout) { $link .= '&layout=' . $layout; }