Hallo ich würde gerne folgendes Navi für Contao anpassen.
HTML-Code:
<div id="navi" class="">
<div id="header_logo_wrapper" class="element_wrapper">
<img id="header_logo" src="" />
</div>
<div id="navigation_wrapper" class="element_wrapper">
<!-- the navigation bar which can be decoupled from the scrolling -->
<div id="sub_navigation">
<?php
$items = array(
'fussball' => array(
'1. Mannschaft',
'2. Mannschaft',
'Alte Herren'
),
'nachwuchs' => array(
'F-Jugend',
'E-Jugend',
'D-Jugend',
'C-Jugend',
'B-Jugend',
'A-Jugend'
)
);
foreach($items as $key => $titleItems) {
print '<ul id="sub_navigation_'.$key.'">';
foreach($titleItems as $title) {
print '<li>';
print '<a href="">'.$title.'</a>';
print '</li>';
}
print '</ul>';
}
?>
</div>
<div id="navigation_seperator_small"></div>
<div id="navigation_seperator"></div>
<div id="navigation">
<ul>
<?php
$items = array(
'START',
'DER VEREIN',
'FUSSBALL',
'FITNESS',
'NACHWUCHS',
'KONTAKT'
);
foreach($items as $title) {
print '<li id="menu_item_'.strtolower($title).'" class="item_wrapper">';
if ($title === 'FUSSBALL' || $title === 'NACHWUCHS') print '<a id="menu_item_'.strtolower($title).'" href="" class="menu_item item_expandable">'.$title.'</a>';
else print '<a id="menu_item_'.strtolower($title).'" href="" class="menu_item item_not_expandable">'.$title.'</a>';
print '<div class="navigation_indicator_wrap">';
if ($title === 'START') print '<div class="navigation_indicator navigation_indicator_active"></div>';
else print '<div class="navigation_indicator"></div>';
print '</div>';
print '</li>';
}
?>
</ul>
</div>
</div>
</div>
das habe ich als Vorgabe, dass Problem ist nur, dass ich ja nicht auf die Contao Sachen zurückgreife, sondern muss ja die Seiten händig eintragen.
Kann mir jemand helfen das oben "contao freundlich" umzusetzen?
HTML-Code:
<ul class="<?php echo $this->level; ?>">
<?php foreach ($this->items as $item): ?>
<?php if ($item['isActive']): ?>
<li class="<?php echo $item['class']; ?>"><span class="<?php echo $item['class']; ?>"><?php echo $item['link']; ?></span><?php echo $item['subitems']; ?></li>
<?php else: ?>
<li<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?>><a href="<?php echo $item['href']; ?>" title="<?php echo $item['pageTitle'] ? $item['pageTitle'] : $item['title']; ?>"<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?><?php if ($item['accesskey'] != ''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; ?><?php if ($item['tabindex']): ?> tabindex="<?php echo $item['tabindex']; ?>"<?php endif; ?><?php if ($item['nofollow']): ?> rel="nofollow"<?php endif; ?><?php echo $item['target']; ?>><?php echo $item['link']; ?></a><?php echo $item['subitems']; ?></li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
das ist ja das normale nav_default template, schaffe das aber nicht mit dem oben zu vereinen.
Lesezeichen