1

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);
}

enter image description here

enter image description here

1

I got to solve this via:

  1. setting the parametters in the Administrator Web Side -> Menus -> Edit Item -> 'Portada' (Inicio) -> Details, Category and Options Tabs

  2. Content ->Articles-> Edit Category -> 'Portada' -> Options Tab -> Alternative Layout (List)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.