├── 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

13 | 14 |

aw Navigation ist eine einfache Navigation die eine ul - li Liste ausgibt. Es können beliebig viele Ebenen ausgegeben werden.

15 | 16 |

Beschreibung der Standard Navigation

17 |

Ein Navigationsobjekt wird immer in dieser Form angelegt:

$nav = new awnav();

18 |

Mit den folgenden Parametern lässt sich die Navigation konfigurieren:

19 | 35 | 36 |

Beschreibung der Breadcrumb Navigation

37 |

Parameter für die Breadcrumb Navigation:

38 |

Ein Navigationsobjekt wird immer in dieser Form angelegt:

$breadcrumb = new awnav();

39 | 44 | 45 |

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 .= ''; 53 | return $out; 54 | } 55 | } 56 | } 57 | 58 | public function getCategoryNav ($category_id) { 59 | if (!$category_id) return ''; 60 | $cssclass = (isset($this->ulClasses[0])) ? ' '.$this->ulClasses[0] : ''; 61 | $dataAttribute = (isset($this->dataAttribute[0])) ? ' '.$this->dataAttribute[0] : ''; 62 | $out = ''; 63 | $lev = 0; 64 | $out .= ''; 70 | return $out; 71 | } 72 | 73 | private function filterNav($category) { 74 | $metaval = explode('|',trim($category->getValue($this->metaField),'|')); 75 | if (array_search($this->metaValue,$metaval) === false) { 76 | return false; 77 | } 78 | return true; 79 | } 80 | 81 | private function _getCategory($cat,$lev = 0) { 82 | $lev++; 83 | $out = ''; 84 | $class = 'inactive'; 85 | $cssclass = (isset($this->ulClasses[$lev])) ? ' '.$this->ulClasses[$lev] : ''; 86 | $dataAttribute = (isset($this->dataAttribute[$lev])) ? ' '.$this->dataAttribute[$lev] : ''; 87 | 88 | if ($cat->getId() == $this->currentCatId) { 89 | $class = $this->currentClass; 90 | } elseif (in_array($cat->getId(), $this->currentPath)) { 91 | $class = $this->activeClass; 92 | } 93 | 94 | 95 | 96 | $this->hasNavPoints = true; 97 | $out .= ' 98 |
  • 99 | ' . $cat->getName() .''; 100 | if ( !empty($_categories = $cat->getChildren($this->ignoreOffline)) 101 | && ($this->fullTree || in_array($cat->getId(), $this->currentPath)) 102 | && $lev < $this->maxLev 103 | ) { 104 | $out .= ''; 124 | } 125 | $out .= '
  • '; 126 | return $out; 127 | } 128 | 129 | 130 | public function getBreadcrumb () { 131 | $out = ''; 132 | if ($this->breadcrumbWithHome) { 133 | $out .= '
  • '.rex_article::get(rex_article::getSiteStartArticleId())->getName().'
  • '; 134 | } 135 | if (rex_article::getCurrentId() == rex_article::getSiteStartArticleId()) { 136 | $out = ''; 137 | } 138 | 139 | foreach ($this->currentPath as $i=>$p) { 140 | $cat = rex_category::get($p); 141 | if (!is_object($cat)) { 142 | continue; 143 | } 144 | if (count($this->currentPath) == ($i+1) && !$this->breadcrumbLastLink) { 145 | $out .= ''; 148 | } else { 149 | $out .= '
  • '; 150 | $out .= ''; 151 | $out .= $cat->getName(); 152 | $out .= ''; 153 | $out .= '
  • '; 154 | } 155 | } 156 | return ''; 157 | } 158 | 159 | } 160 | 161 | --------------------------------------------------------------------------------