Hi,
du hast die Möglichkeit in der mod_navigation das Template abzufragen das Du der Navigation zugewiesen hast.
Ist es z.B. nav_default kannst Du es so machen:
PHP-Code:
<?php
if($this->navigationTpl == 'nav_default'){
echo '<div class="meineKLasse">';
}
?>
und dann dein Div mit der Klasse ausgeben. Für das schließende Div dann das gleiche. insgesamt sieht die mod_navigation dann so aus (html5):
PHP-Code:
<!-- indexer::stop -->
<?php
if($this->navigationTpl == 'nav_default'){
echo '<div class="meineKLasse">';
}
?>
<nav class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<?php if ($this->headline): ?>
<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
<?php endif; ?>
<a href="<?php echo $this->request; ?>#<?php echo $this->skipId; ?>" class="invisible"><?php echo $this->skipNavigation; ?></a>
<?php echo $this->items; ?>
<a id="<?php echo $this->skipId; ?>" class="invisible">[nbsp]</a>
</nav>
<?php
if($this->navigationTpl == 'nav_default'){
echo '</div>';
}
?>
<!-- indexer::continue -->
Jetzt wird das Div nur in der Navigation mit ausgegeben die das Template nav_default bekommen hat.
Hoffe es hilft weiter.
JMMB
Lesezeichen