Joomla3.0 模块中的类别标签(mod_articles_Categories)

Joomla3.0 模块中的类别标签(mod_articles_Categories),joomla3.0,Joomla3.0,我需要在类别列表模块(mod_articles_categories)中显示每个子类别的标签。 对于类似模块中的文章(mod_articles_news),我总是这样做: <?php $itemtags = (new JHelperTags)->getItemTags('com_content.article', $item->id); $taglayout = new JLayoutFile('joomla.content.tags'); foreach ($itemtags

我需要在类别列表模块(mod_articles_categories)中显示每个子类别的标签。 对于类似模块中的文章(mod_articles_news),我总是这样做:

<?php $itemtags = (new JHelperTags)->getItemTags('com_content.article', $item->id);
$taglayout = new JLayoutFile('joomla.content.tags');
foreach ($itemtags as $tag) { echo $tag->title; } ?>

但是,即使我将“com_content.article”更改为“com_content.category”,这样的代码也不起作用

也许有人知道我做错了什么?
提前感谢

好的,最后我得到了解决方案:

<?php foreach ($list as $item) :
$itemtags = (new JHelperTags)->getItemTags('com_content.category', $item->id);
$taglayout = new JLayoutFile('joomla.content.tags');?>
<?php if (!empty($itemtags)) { foreach ($itemtags as $tag) { echo $tag->title.' '; }; } ?>
<div><?php echo $item->title; ?></div>
<?php endforeach; ?>