subject->getContainer(); $application_name = $container->application_name; $component_name = 'com_' . strtolower($application_name); // That's the path in the site's current template containing template overrides $overridePath = Helper::getTemplateOverridePath($component_name, true); // The alternative view name (pluralised if the view is singular, singularised if the view is plural) $altViewName = Inflector::isPlural($viewName) ? Inflector::singularize($viewName) : Inflector::pluralize($viewName); // Remember, each path is pushed to the TOP of the path stack. This means that the least important directory // must go FIRST so that it ends add being added LAST. return array( $overridePath . '/' . $altViewName, $overridePath . '/' . $viewName, ); } }