I am building a template override for the default featured blog layout. Item tags are displayed with :

<?php if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
  <?php echo JLayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?>
<?php endif; ?>

This displays the article tags but is it possible to display the first parent category tags instead?

1 Answer 1


I did not remember how to get the parent category of article item, but to get the tags for current category you can try to use this code:

$categoryTags = new JHelperTags;
$categoryTags->getItemTags('com_content.category', $item->catid);

<?php echo JLayoutHelper::render('joomla.content.tags', $categoryTags->itemTags); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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