I would like to get the name of the active layout for the category content component what is being used at this moment in my joomla through one override one_template/html/com_content/category/blog2.php' and 'one_template_name/html/layouts/joomla/content/category_default_without_title_categ.php' and 'one_template/html/layouts/joomla/content/category_default.php'
The code inside 'category_default.php':
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
JHtml::_('behavior.caption');
?>
<div class="category-list<?php echo $this->pageclass_sfx;?>">
<?php
$this->subtemplatename = 'articles';
echo JLayoutHelper::render('joomla.content.category_default_without_title_categ', $this);
?>
</div>
</div>
Depending of the name of the current used layout file (ej, blog2.php or blog.php) what is being used I would like choose and load one (category_default_without_title_categ.php) or other (category_default.php) by a conditional instruction like:
if(){
echo JLayoutHelper::render('joomla.content.category_default_without_title_categ', $this);
}
else{
echo JLayoutHelper::render('joomla.content.category_default', $this);
}