Improve show tags code

This commit is contained in:
Tuan Pham Ngoc 2021-08-18 15:36:02 +07:00 committed by GitHub
parent 84ec6b93e7
commit 620f535ceb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -123,10 +123,8 @@ $listDirn = $this->escape($this->state->get('list.direction'));
}
?>
</div>
<?php $tagsData = $item->tags->getItemTags('com_weblinks.weblink', $item->id); ?>
<?php if ($this->params->get('show_tags', 1)) : ?>
<?php $tagLayout = new JLayoutFile('joomla.content.tags'); ?>
<?php echo $tagLayout->render($tagsData); ?>
<?php if ($this->params->get('show_tags', 1) && !empty($item->tags->itemTags)) : ?>
<?php echo JLayoutHelper::render('joomla.content.tags', $item->tags->itemTags); ?>
<?php endif; ?>
<?php if (($this->params->get('show_link_description')) and ($item->description != '')) : ?>
<?php $images = json_decode($item->images); ?>