Files
esun3d/app/code/Esun/CustomerMessage/view/frontend/templates/account/navigation-link.phtml
T
2026-09-15 10:35:56 +08:00

19 lines
895 B
PHTML

<?php
/** @var \Esun\CustomerMessage\Block\Account\NavigationLink $block */
/** @var \Magento\Framework\Escaper $escaper */
$unreadCount = $block->getUnreadCount();
$label = __((string)$block->getLabel());
?>
<li class="nav item<?= $block->isCurrent() ? ' current' : '' ?>">
<?php if ($block->isCurrent()): ?>
<strong aria-current="page">
<?php else: ?>
<a href="<?= $escaper->escapeUrl($block->getHref()) ?>"<?= $block->getTitle() ? ' title="' . $escaper->escapeHtmlAttr(__((string)$block->getTitle())) . '"' : '' ?>>
<?php endif; ?>
<span><?= $escaper->escapeHtml($label) ?></span>
<?php if ($unreadCount): ?>
<b class="esun-unread-badge" aria-label="<?= $escaper->escapeHtmlAttr(__('%1 unread messages', $unreadCount)) ?>"><?= (int)$unreadCount ?></b>
<?php endif; ?>
<?= $block->isCurrent() ? '</strong>' : '</a>' ?>
</li>