<?php
    /**
 * @package Helix3 Framework
 * @author JoomShaper https://www.joomshaper.com
 * @copyright (c) 2010 - 2026 JoomShaper
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
 */

    defined('_JEXEC') or die;

    use Joomla\CMS\Helper\RouteHelper;
    use Joomla\CMS\Language\Text;
    use Joomla\CMS\Router\Route;

?>
<?php JLoader::register('TagsHelperRoute', JPATH_BASE . '/components/com_tags/helpers/route.php'); ?>
<div class="tagssimilar">
<?php if ($list): ?>
	<ul>
	<?php foreach ($list as $i => $item): ?>
		<li>
			<?php $item->route = new RouteHelper; ?>
			<a href="<?php echo Route::_(TagsHelperRoute::getItemRoute($item->content_item_id, $item->core_alias, $item->core_catid, $item->core_language, $item->type_alias, $item->router)); ?>">
				<?php if (! empty($item->core_title)):
                        echo htmlspecialchars($item->core_title);
                endif; ?>
			</a>
		</li>
	<?php endforeach; ?>
	</ul>
<?php else: ?>
	<span><?php echo Text::_('MOD_TAGS_SIMILAR_NO_MATCHING_TAGS'); ?></span>
<?php endif; ?>
</div>
