├── boot.php ├── package.yml ├── lib └── yrewrite_one_level.php ├── LICENSE └── README.md /boot.php: -------------------------------------------------------------------------------- 1 | isAvailable()) { 3 | rex_yrewrite::setScheme(new yrewrite_one_level()); 4 | } 5 | -------------------------------------------------------------------------------- /package.yml: -------------------------------------------------------------------------------- 1 | package: yrewrite_one_level 2 | version: '2.0.0' 3 | author: Friends Of REDAXO 4 | supportpage: https://github.com/FriendsOfREDAXO/yrewrite_one_level 5 | 6 | requires: 7 | packages: 8 | yrewrite: '>=1.0.0' 9 | -------------------------------------------------------------------------------- /lib/yrewrite_one_level.php: -------------------------------------------------------------------------------- 1 | normalize($art->getName(), $art->getClang()); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ⚠️ Entwicklung eingestellt: Das AddOn wurde im Oktober 2017 in das AddOn [YRewrite Scheme](https://github.com/FriendsOfREDAXO/yrewrite_scheme) integriert und wird an dieser Stelle nicht länger gepflegt. / Deprecated: as of october 2017 the addOn has been merged into the [YRewrite Scheme](https://github.com/FriendsOfREDAXO/yrewrite_scheme) addOn and won’t be maintained any longer. 2 | 3 | --- 4 | 5 | # URL-Schema »One-level« für YRewrite 6 | 7 | Implementiert ein kurzes URL-Schema für alle Unterseiten auf Basis von [yrewrite](https://github.com/yakamara/redaxo_yrewrite). 8 | 9 | ## Schema 10 | 11 | __Vorher:__ 12 | 13 | `example.tld/en/coffee/beans/india/malabar.html` _(yrewrite 1)_ 14 | `example.tld/en/coffee/beans/india/malabar/` _(yrewrite 2)_ 15 | 16 | __Nachher:__ 17 | 18 | `example.tld/en/malabar` _(ohne trailing slash)_ 19 | 20 | ⚠️ Wichtig: Das Schema ist nur dann sinnvoll, wenn Seiten innerhalb einer Sprache __nicht mehrfach vorkommen__. Gäbe es etwa den Malabar-Kaffee nicht nur in 🇮🇳 Indien, sondern auch in 🇧🇷 Brasilien, sollte dieses URL-Schema besser nicht verwendet werden! 21 | 22 | ## Eigenes Schema verwenden ohne dieses AddOn? 23 | 24 | Anleitung und Beispiele: https://github.com/FriendsOfREDAXO/tricks/blob/master/addons_yrewrite_url_schemes.md 25 | --------------------------------------------------------------------------------