├── lang └── de_de.lang ├── boot.php ├── package.yml ├── pages └── index.php ├── README.md ├── LICENSE ├── help.php └── lib └── awnav.php /lang/de_de.lang: -------------------------------------------------------------------------------- 1 | awnav = aw Navigation 2 | 3 | 4 | -------------------------------------------------------------------------------- /boot.php: -------------------------------------------------------------------------------- 1 | =5.0.0' 13 | -------------------------------------------------------------------------------- /pages/index.php: -------------------------------------------------------------------------------- 1 | setVar('body', $outtext, false); 17 | $content = $fragment->parse('core/page/section.php'); 18 | 19 | echo $content; 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | aw Navigation für REDAXO 5.0 2 | ============= 3 | 4 | 5 | Installation 6 | ------- 7 | 8 | * Ins Backend einloggen und mit dem Installer installieren 9 | 10 | oder 11 | 12 | * ZIP Paket aus https://github.com/FriendsOfREDAXO/aw_navigation herunterladen 13 | * Unzippten 14 | * Ordner in den AddOns Ordner von REDAXO schieben 15 | * Über das REDAXO Backenend das AddOn installieren und aktivieren 16 | 17 | Last Changes 18 | ------- 19 | 20 | ### Version 0.2.1 // 20.07.2016 21 | 22 | * Die Navigation ist bereits im praktischen Einsatz 23 | 24 | 25 | Special 26 | ------- 27 | 28 | Die Navigation ist als Baukasten für eigene Navigationen gedacht. Derzeit ist sie hauptsächlich für die Drilldown Navigation des Foundation Frameworks optimiert. 29 | 30 | 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Friends Of REDAXO 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /help.php: -------------------------------------------------------------------------------- 1 | 12 |
aw Navigation ist eine einfache Navigation die eine ul - li Liste ausgibt. Es können beliebig viele Ebenen ausgegeben werden.
15 | 16 |Ein Navigationsobjekt wird immer in dieser Form angelegt:
$nav = new awnav();18 |
Mit den folgenden Parametern lässt sich die Navigation konfigurieren:
19 |Nur die ersten drei Ebenen ausgegeben:
$nav->maxLev = 3;
Auch Kategorien angezeigt, die offline sind:
$nav->ignoreOffline = true;
CSS Klassen für ul Element definieren:
$nav->ulClasses = array('ul-lev-0','ul-lev-1','ul-lev-2');Gesamten Navigationsbaum ausgeben (nicht nur den aktuellen Pfad):
$nav->fullTree = true;
Filter über Metainformation erstellen:
$nav->metaField = 'cat_nav_type'; 25 | $nav->metaValue = "2";
Es werden nur Navigationspunkte ausgegeben, die in der ersten Ebene im Metafeld cat_nav_type den Wert 2 haben.
Die Navigation ausgeben:
echo $nav->getNavigation();
Navigation für eine bestimmte Kategorie ausgeben (z.B. für die Kategorie 1):
$catnav = new awnav(); 28 | echo $catnav->getCategoryNav(1);
Die übergeordnete Kategorie in der Kategorie nochmals als Link anzeigen. Dies ist bei bestimmten Mobilen Navigationen sinnvoll, um die Kategorie-Hauptseite auch verfügbar zu machen, wenn der Menüpunkt die nächste Ebene anzeigt.
$nav->showTopCategory = true;
Für jede ul-Ebene lassen sich zusätzliche data-Attribute (oder andere Angaben) ausgeben:
$nav->dataAttribute = array('data-responsive-menu="drilldown medium-dropdown"');Für Untermenüpunkte einen Zurück-Button anzeigen. Damit lässt sich beispielsweise die Foundation 6 Drilldown Navigation umsetzen
$nav->showBackButton = true;
HTML für den Zurück-Button (showBackButton = true)
$nav->backButtonText = '<li class="js-drilldown-back"><a>Zurück</a></li>';
Zusätzliches Listenelement am Ende der 1. Ebene ausgeben
$nav->additionalLi = '<li>...</li>';
Parameter für die Breadcrumb Navigation:
38 |Ein Navigationsobjekt wird immer in dieser Form angelegt:
$breadcrumb = new awnav();39 |
Am Anfang ein zusätzliches Element für "Home" ausgeben:
$breadcrumb->breadcrumbWithHome = true;
Standard ist false. Auf der Startseite selbst wird kein zusätzliches Element ausgegeben.
Die Breadcrumb Navigation ausgeben:
echo $breadcrumb->getBreadcrumb();
Das letzte (aktuelle) Element mit ausgeben:
$breadcrumb->breadcrumbLastLink = true;
Standard ist false.
Fragen, Anregungen und Wünsche bitte ins Forum.
-------------------------------------------------------------------------------- /lib/awnav.php: -------------------------------------------------------------------------------- 1 | Zurück'; 24 | 25 | var $hasNavPoints = false; 26 | 27 | 28 | public function __construct() { 29 | $this->currentCat = rex_category::getCurrent(); 30 | if (is_object($this->currentCat)) { 31 | $this->currentCatId = $this->currentCat->getId(); 32 | $this->currentPath = explode('|', trim($this->currentCat->getPath(), '|') . '|' . $this->currentCatId); 33 | $this->startCategory = $this->currentPath[0] ? $this->currentPath[0] : $this->currentPath[1]; 34 | } 35 | } 36 | 37 | public function getNavigation() { 38 | $out = ''; 39 | $cssclass = (isset($this->ulClasses[0])) ? ' '.$this->ulClasses[0] : ''; 40 | $dataAttribute = (isset($this->dataAttribute[0])) ? ' '.$this->dataAttribute[0] : ''; 41 | $categories = rex_category::getRootCategories($this->ignoreOffline); 42 | if (!empty($categories)) { 43 | if (!empty($categories)) { 44 | $out .= '