Skip to content

Commit

Permalink
Update the navigation template for Contao 4.13+ (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Nov 20, 2024
1 parent c6b9eb9 commit 40dcd9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contao/templates/nav_folderpage.html5
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<?php foreach ($this->items as $item): ?>
<?php if ('folder' == $item['type']): ?>
<?php $item['class'] .= ' folder'; ?>
<li class="<?= $item['class'] ?>"><span class="<?= $item['class'] ?>"<?php if (!empty($item['subitems'])) echo ' aria-haspopup="true"'; ?> itemprop="name"><?= $item['link'] ?></span><?= $item['subitems'] ?></li>
<li class="<?= $item['class'] ?>"><span class="<?= $item['class'] ?>"<?php if (!empty($item['subitems'])): ?> aria-haspopup="true"<?php endif; ?>><?= $item['link'] ?></span><?= $item['subitems'] ?? '' ?></li>
<?php elseif ($item['isActive']): ?>
<li class="<?= $item['class'] ?>"><strong class="<?= $item['class'] ?>"<?php if (!empty($item['subitems'])) echo ' aria-haspopup="true"'; ?> itemprop="name"><?= $item['link'] ?></strong><?= $item['subitems'] ?></li>
<li class="<?= $item['class'] ?>"><strong class="<?= $item['class'] ?>"<?php if (!empty($item['subitems'])): ?> aria-haspopup="true"<?php endif; ?>><?= $item['link'] ?></strong><?= $item['subitems'] ?? '' ?></li>
<?php else: ?>
<li<?php if ($item['class']) echo ' class="'.$item['class'].'"'; ?>><a href="<?= $item['href'] ?: './' ?>" title="<?= $item['pageTitle'] ?: $item['title'] ?>"<?php if ($item['class']) echo ' class="'.$item['class'].'"'; ?><?php if ($item['accesskey']) echo ' accesskey="'.$item['accesskey'].'"'; ?><?php if ($item['tabindex']) echo ' tabindex="'.$item['tabindex'].'"'; ?><?php if ($item['nofollow']) echo ' rel="nofollow"'; ?><?= $item['target'] ?><?php if (!empty($item['subitems'])) echo ' aria-haspopup="true"'; ?> itemprop="url"><span itemprop="name"><?= $item['link'] ?></span></a><?= $item['subitems'] ?></li>
<li<?php if ($item['class']): ?> class="<?= $item['class'] ?>"<?php endif; ?>><a href="<?= $item['href'] ?: './' ?>" title="<?= $item['pageTitle'] ?: $item['title'] ?>"<?php if ($item['class']): ?> class="<?= $item['class'] ?>"<?php endif; ?><?php if ('' !== $item['accesskey']): ?> accesskey="<?= $item['accesskey'] ?>"<?php endif; ?><?php if ($item['tabindex'] ?? null): ?> tabindex="<?= $item['tabindex'] ?>"<?php endif; ?><?= $item['target'] ?><?= $item['rel'] ?? '' ?><?php if (!empty($item['subitems'])): ?> aria-haspopup="true"<?php endif; ?>><?= $item['link'] ?></a><?= $item['subitems'] ?? '' ?></li>
<?php endif; ?>
<?php endforeach; ?>
</ul>

0 comments on commit 40dcd9e

Please sign in to comment.