Ergebnis 1 bis 4 von 4

Thema: Änderungsvorschlag für Template nav_moomenu.tpl

  1. #1
    Contao-Fan Avatar von kos
    Registriert seit
    22.06.2009.
    Ort
    Westerwald
    Beiträge
    888

    Standard Änderungsvorschlag für Template nav_moomenu.tpl

    Hallo Andreas,

    im Standard-Navigations-Template von Contao nav_default.tpl werden die aktiven Links durch
    <span class="active">...</span> dargestellt.

    Im Template nav_moomenu.tpl wird aber hier (wie früher auch in TL)
    <p class="active">...</p> benutzt.

    Wäre es nicht sinnvoll, das anzugleichen?

  2. #2
    Contao Core-Team
    Association Vorstand
    Avatar von andreas.schempp
    Registriert seit
    15.06.2009.
    Ort
    Lyss
    Beiträge
    5.613
    Partner-ID
    8667
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Doch, das werd ich irgendwann machen...
    Schon vor mehr als einem Jahr habe ich (mit Hilfe) das Modul weiterentwickelt aber nie feretig gestellt. deshalb ist es nie veröffentlicht...
    terminal42 gmbh
    Wir sind Contao Premium-Partner! Für Modulwünsche oder Programmierungen kannst du uns gerne kontaktieren.
    Hilfe für Isotope eCommerce kann man auch kaufen: Isotope Circle

  3. #3
    Contao-Fan Avatar von kos
    Registriert seit
    22.06.2009.
    Ort
    Westerwald
    Beiträge
    888

    Standard

    Hallo Andreas,

    Zitat Zitat von andreas.schempp Beitrag anzeigen
    Doch, das werd ich irgendwann machen...
    Schon vor mehr als einem Jahr habe ich (mit Hilfe) das Modul weiterentwickelt aber nie feretig gestellt. deshalb ist es nie veröffentlicht...
    Ich glaube, hier reden wir etwas aneinander vorbei.
    Das besagte Template ist Bestandteil Deiner Erweiterung mootoolsnav, die Du gerade erst für CTO 2.9 freigegeben hast - dann ist sie doch fertig, oder?. Ich vermute daher, bei obiger Aussage hattest Du eine andere Deiner vielen Extensions im Sinn.

    Ich binde hier mal den Code ein:

    Istzustand des Templates nav_moomenu.tpl:
    PHP-Code:
    <?php

      $togglerlevel 
    'level_1';
      
    $menulevel 'level_2';

    ?>

    <ul class="<?php echo $this->level; if($this->level == $menulevel) echo ' menuaccord" onmouseover="moomenu_stop()" onmouseout="moomenu_fire()'?>">
    <?php if (!isset($GLOBALS['accorditem'][$this->level])) $GLOBALS['accorditem'][$this->level] = 0?>

    <?php foreach($this->items as $item): ?>

    <?php if ($item['isActive']): ?>

    <?php if(empty($item['subitems'])): /* Ohne Untermenüs */ ?>

    <li class="<?php if ($item['class']) echo $item['class']; ?><?php if($this->level == $togglerlevel) echo ' nosubmenu'?>"><p class="active <?php if ($item['class']): ?> <?php echo $item['class']; endif; ?>"><?php echo $item['link']; ?></p></li>

    <?php else: /* Mit Untermenüs */ ?>
    <?php 
    if ($this->level == $togglerlevel$GLOBALS['activemenuaccord'] = $GLOBALS['accorditem'][$this->level]; ?>
    <li class="active <?php if ($item['class']) echo $item['class']; ?><?php if($this->level == $togglerlevel): ?> menutoggler<?php endif; ?>"><p class="active <?php if ($item['class']): ?> <?php echo $item['class']; endif; ?>"<?php if($this->level == $togglerlevel): ?> onmouseover="moomenu.accordion.display(<?php echo $GLOBALS['accorditem'][$this->level]; ?>)" onmouseout="moomenu.accordion.display(activemenuaccord)"<?php endif; ?>><?php echo $item['link']; ?></p><?php echo $item['subitems']; ?></li>
    <?php $GLOBALS['accorditem'][$this->level]++; ?>
    <?php 
    endif; ?>
    <?php 
    else: ?>

    <?php if ($this->level == $togglerlevel && strpos($item['class'], 'trail') !== false$GLOBALS['activemenuaccord'] = $GLOBALS['accorditem'][$this->level]; ?>

    <?php if($this->level == $togglerlevel): /* Level 1 */ ?>

    <?php if(empty($item['subitems'])): /* Ohne Untermenüs */ ?>

    <li class="<?php if ($item['class']) echo $item['class']; ?> nosubmenu" onmouseover="moomenu_stop()" onmouseout="moomenu_fire()"><a href="<?php echo $item['href']; ?>"<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?><?php if ($item['accesskey'] != ''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; if ($item['tabindex']): ?> tabindex="<?php echo $item['tabindex']; ?>"<?php endif; ?> onclick="this.blur();<?php echo $item['target']; ?>"><?php echo $item['link']; ?></a></li>

    <?php else: /* Mit Untermenüs */ ?>
    <li class="<?php if ($item['class']) echo $item['class']; ?> menutoggler"><a href="<?php echo $item['href']; ?>"<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?><?php if ($item['accesskey'] != ''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; if ($item['tabindex']): ?> tabindex="<?php echo $item['tabindex']; ?>"<?php endif; ?> onclick="this.blur();<?php echo $item['target']; ?>" onmouseover="moomenu_display(<?php echo $GLOBALS['accorditem'][$this->level]; ?>)" onmouseout="moomenu_fire()"><?php echo $item['link']; ?></a><?php echo $item['subitems']; ?></li>
    <!-- count accorditem -->
    <?php $GLOBALS['accorditem'][$this->level]++; ?>
    <?php 
    endif; ?>

    <?php else: /* Level 2 oder höher */ a?>

    <li class="<?php if ($item['class']) echo $item['class']; ?>"><a href="<?php echo $item['href']; ?>"<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?><?php if ($item['accesskey'] != ''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; if ($item['tabindex']): ?> tabindex="<?php echo $item['tabindex']; ?>"<?php endif; ?> onclick="this.blur();<?php echo $item['target']; ?>"><?php echo $item['link']; ?></a><?php echo $item['subitems']; ?></li>

    <?php endif; ?>

    <?php endif; ?>

    <?php endforeach; ?>
    </ul>
    und hier meine Änderungsvorschlag, der lediglich die Zeilen 17 und 21 betrifft ( das sind die ersten beiden Zeilen, die mit <li class=".. beginnen) :
    PHP-Code:
    <?php

      $togglerlevel 
    'level_1';
      
    $menulevel 'level_2';

    ?>

    <ul class="<?php echo $this->level; if($this->level == $menulevel) echo ' menuaccord" onmouseover="moomenu_stop()" onmouseout="moomenu_fire()'?>">
    <?php if (!isset($GLOBALS['accorditem'][$this->level])) $GLOBALS['accorditem'][$this->level] = 0?>

    <?php foreach($this->items as $item): ?>

    <?php if ($item['isActive']): ?>

    <?php if(empty($item['subitems'])): /* Ohne Untermenüs */ ?>

    <li class="<?php if ($item['class']) echo $item['class']; ?><?php if($this->level == $togglerlevel) echo ' nosubmenu'?>"><span class="active <?php if ($item['class']): ?> <?php echo $item['class']; endif; ?>"><?php echo $item['link']; ?></span></li>

    <?php else: /* Mit Untermenüs */ ?>
    <?php 
    if ($this->level == $togglerlevel$GLOBALS['activemenuaccord'] = $GLOBALS['accorditem'][$this->level]; ?>
    <li class="active <?php if ($item['class']) echo $item['class']; ?><?php if($this->level == $togglerlevel): ?> menutoggler<?php endif; ?>"><span class="active <?php if ($item['class']): ?> <?php echo $item['class']; endif; ?>"<?php if($this->level == $togglerlevel): ?> onmouseover="moomenu.accordion.display(<?php echo $GLOBALS['accorditem'][$this->level]; ?>)" onmouseout="moomenu.accordion.display(activemenuaccord)"<?php endif; ?>><?php echo $item['link']; ?></span><?php echo $item['subitems']; ?></li>
    <?php $GLOBALS['accorditem'][$this->level]++; ?>
    <?php 
    endif; ?>
    <?php 
    else: ?>

    <?php if ($this->level == $togglerlevel && strpos($item['class'], 'trail') !== false$GLOBALS['activemenuaccord'] = $GLOBALS['accorditem'][$this->level]; ?>

    <?php if($this->level == $togglerlevel): /* Level 1 */ ?>

    <?php if(empty($item['subitems'])): /* Ohne Untermenüs */ ?>

    <li class="<?php if ($item['class']) echo $item['class']; ?> nosubmenu" onmouseover="moomenu_stop()" onmouseout="moomenu_fire()"><a href="<?php echo $item['href']; ?>"<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?><?php if ($item['accesskey'] != ''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; if ($item['tabindex']): ?> tabindex="<?php echo $item['tabindex']; ?>"<?php endif; ?> onclick="this.blur();<?php echo $item['target']; ?>"><?php echo $item['link']; ?></a></li>

    <?php else: /* Mit Untermenüs */ ?>
    <li class="<?php if ($item['class']) echo $item['class']; ?> menutoggler"><a href="<?php echo $item['href']; ?>"<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?><?php if ($item['accesskey'] != ''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; if ($item['tabindex']): ?> tabindex="<?php echo $item['tabindex']; ?>"<?php endif; ?> onclick="this.blur();<?php echo $item['target']; ?>" onmouseover="moomenu_display(<?php echo $GLOBALS['accorditem'][$this->level]; ?>)" onmouseout="moomenu_fire()"><?php echo $item['link']; ?></a><?php echo $item['subitems']; ?></li>
    <!-- count accorditem -->
    <?php $GLOBALS['accorditem'][$this->level]++; ?>
    <?php 
    endif; ?>

    <?php else: /* Level 2 oder höher */ a?>

    <li class="<?php if ($item['class']) echo $item['class']; ?>"><a href="<?php echo $item['href']; ?>"<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?><?php if ($item['accesskey'] != ''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; if ($item['tabindex']): ?> tabindex="<?php echo $item['tabindex']; ?>"<?php endif; ?> onclick="this.blur();<?php echo $item['target']; ?>"><?php echo $item['link']; ?></a><?php echo $item['subitems']; ?></li>

    <?php endif; ?>

    <?php endif; ?>

    <?php endforeach; ?>
    </ul>
    Durch diese Änderung würde dann die gleiche Auszeichnung benutzt wie im Standard-Template.

  4. #4
    Contao Core-Team
    Association Vorstand
    Avatar von andreas.schempp
    Registriert seit
    15.06.2009.
    Ort
    Lyss
    Beiträge
    5.613
    Partner-ID
    8667
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Wir sprechen schon vom selben. Ich wollte die Erweiterung mal überarbeiten um z.B. das Level im Modul definieren zu können. Für 2.9 freigegeben habe ich sie, weil sie funktioniert ;-)
    terminal42 gmbh
    Wir sind Contao Premium-Partner! Für Modulwünsche oder Programmierungen kannst du uns gerne kontaktieren.
    Hilfe für Isotope eCommerce kann man auch kaufen: Isotope Circle

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Ähnliche Themen

  1. [pdf-template] Template und CSS für PDF-Ausgabe von Artikeln
    Von do_while im Forum Sonstige Erweiterungen
    Antworten: 155
    Letzter Beitrag: 17.09.2019, 16:19
  2. Antworten: 0
    Letzter Beitrag: 31.01.2011, 15:29
  3. Antworten: 2
    Letzter Beitrag: 12.05.2010, 15:03
  4. In Template auf anderes Template zugreifen
    Von Andreas im Forum Sonstiges zu Contao
    Antworten: 1
    Letzter Beitrag: 12.07.2009, 13:41

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •