diff --git a/components/com_tags/models/tag.php b/components/com_tags/models/tag.php index 147fb333fc7f3..eb7d8ee528167 100644 --- a/components/com_tags/models/tag.php +++ b/components/com_tags/models/tag.php @@ -89,9 +89,14 @@ public function getItems() { foreach ($items as $item) { - $explodedTypeAlias = explode('.', $item->type_alias); - $item->link = 'index.php?option=' . $explodedTypeAlias[0] . '&view=' . $explodedTypeAlias[1] . '&id=' - . $item->content_item_id . ':' . $item->core_alias; + $item->link = TagsHelperRoute::getItemRoute( + $item->content_item_id, + $item->core_alias, + $item->core_catid, + $item->core_language, + $item->type_alias, + $item->router + ); // Get display date switch ($this->state->params->get('tag_list_show_date')) diff --git a/components/com_tags/views/tag/tmpl/default_items.php b/components/com_tags/views/tag/tmpl/default_items.php index 87cb5e4aab90d..b5fb3edbb29af 100644 --- a/components/com_tags/views/tag/tmpl/default_items.php +++ b/components/com_tags/views/tag/tmpl/default_items.php @@ -9,8 +9,6 @@ defined('_JEXEC') or die; -JHtml::addIncludePath(JPATH_COMPONENT . '/helpers'); - JHtml::_('behavior.core'); JHtml::_('formbehavior.chosen', 'select'); @@ -22,8 +20,6 @@ $canEdit = $user->authorise('core.edit', 'com_tags'); $canCreate = $user->authorise('core.create', 'com_tags'); $canEditState = $user->authorise('core.edit.state', 'com_tags'); -$items = $this->items; -$n = count($this->items); JFactory::getDocument()->addScriptDeclaration(" var resetFilter = function() { @@ -64,32 +60,32 @@
- items === false || $n === 0) : ?> + items)) : ?>