blob: ba70ce57afcc25fa0d2b516ccab148aed1abd2b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
$attributes = $nav->getLinkAttributes();
$image_attributes = $nav->getImage()->getAttributes();
$attributes['title'] = $image_attributes['title'] ?? null;
// Add badge number to link attributes
if ($nav->getBadgeNumber()) {
$attributes['data-badge'] = (int)$nav->getBadgeNumber();
}
// Convert link attributes array to proper attribute string
$attr_str = arrayToHtmlAttributes($attributes);
?>
<li id="nav_<?= $path ?>"<? if ($nav->isActive()) : ?> class="active"<? endif ?>>
<a href="<?= URLHelper::getLink($nav->getURL(), $link_params) ?>" <?= $attr_str ?>>
<?= $nav->getImage()->asImg(['class' => 'headericon original', 'title' => null]) ?>
<div class="navtitle"><?= htmlReady($nav->getTitle()) ?></div>
</a>
</li>
|