blob: 76a3d4cc7303e552d969d3637ca5d2a357a11680 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
$attributes = $nav->getLinkAttributes();
$image_attributes = $nav->getImage()->getAttributes();
if (!empty($image_attributes['title'])) {
$attributes['title'] = $image_attributes['title'];
}
// 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(32, ['class' => 'headericon original', 'title' => null]) ?>
<div class="navtitle"><?= htmlReady($nav->getTitle()) ?></div>
</a>
</li>
|