I created an override /html/com_content/category/default_children.php
I can get the category id and display it for reference in the list by adding <?php echo $child->id; ?> where the child category titles are displayed
Code: Select all
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip hasTooltip" title="<?php echo HTMLHelper::_('tooltipText', 'COM_CONTENT_NUM_ITEMS'); ?>">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if (count($child->getChildren()) > 0 && $this->maxLevel > 1) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
<?php echo $child->id; ?>
</h3>
https://docs.joomla.org/J3.x:Using_Tags_in_an_Extension
https://docs.joomla.org/Tags_API_Guide
I have these defined
Code: Select all
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Helper\TagsHelper;
Code: Select all
<?php
$th = new TagsHelper();
$result = $th->getItem->Tags->$child->id;
echo $result;
?>
Does anyone know how to display the category tags? or what I am missing here?