| Current Path : /home/helpink/www/templates/tp_landing/html/layouts/joomla/content/info_block/ |
| Current File : /home/helpink/www/templates/tp_landing/html/layouts/joomla/content/info_block/parent_category.php |
<?php
/**
* @package Astroid Framework
* @author Astroid Framework https://astroidframe.work
* @copyright Copyright (C) 2023 AstroidFrame.work.
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/
defined('JPATH_BASE') or die;
use Joomla\CMS\Router\Route;
if (ASTROID_JOOMLA_VERSION > 3) {
\JLoader::registerAlias('ContentHelperRoute', 'Joomla\Component\Content\Site\Helper\RouteHelper');
} else {
include_once(JPATH_COMPONENT . '/helpers/route.php');
}
?>
<dd class="parent-category-name">
<?php $title = $this->escape($displayData['item']->parent_title); ?>
<?php if ($displayData['params']->get('link_parent_category') && !empty($displayData['item']->parent_slug)) : ?>
<?php $url = '<a href="' . Route::_(ContentHelperRoute::getCategoryRoute($displayData['item']->parent_slug)) . '" itemprop="genre">' . $title . '</a>'; ?>
<i class="far fa-folder-open"></i>
<?php echo $url; ?>
<?php else : ?>
<i class="far fa-folder-open"></i>
<?php echo '<span itemprop="genre">' . $title . '</span>'; ?>
<?php endif; ?>
</dd>