forked from darwin26/navigation_factory
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
RexDude
committed
Nov 15, 2015
1 parent
41d3790
commit 5f9a900
Showing
14 changed files
with
149 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Breadcrumb Navigation | ||
===================== | ||
|
||
Ausgabe einer Breadcrumb Navigation | ||
----------------------------------- | ||
|
||
```php | ||
$breadcrumbNav = new rex_breadcrumb_nav(); | ||
|
||
$nav->setCssClass("breadcrumb"); // ul klasse: "breadcrumb" | ||
$nav->setOlList(false); // es wird eine ul liste ausgegeben | ||
$nav->setStartArticleName("<i class='fa fa-home'></i>"); // ausgabe mit font-awesome icon | ||
|
||
echo $breadcrumbNav->getNavigation(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Sprachnavigation | ||
================ | ||
|
||
Ausgabe einer einfachen Sprachnavigation | ||
---------------------------------------- | ||
|
||
```php | ||
$langNav = new rex_lang_nav(); | ||
|
||
$nav->setUlId("lang-nav"); // ul id: "lang-nav" | ||
$nav->setUlClass("my-lang-class"); // ul class: "my-lang-class" | ||
$nav->setselectedClass("current"); // li klasse für selektierten menüpunkt: "current" | ||
$nav->setshowLiIds(true); // zusätzliche, eindeutige li id's werden ausgegeben | ||
$nav->sethideLiIfOfflineArticle(false); // bei einem offline artikel li nicht verstecken sondern auf startartikel der website verlinken | ||
$nav->setuseLangCodeAsLinkText(true); // langcode anstelle sprachname als linktext ausgeben | ||
$nav->setupperCaseLinkText(true); // linktext in großbuchstaben anzeigen | ||
|
||
echo $langNav->getNavigation(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,18 @@ | ||
navigation_factory_addon_help = | ||
|
||
navigation_factory_start = Start | ||
navigation_factory_settings = Einstellungen | ||
navigation_factory_setup = Setup | ||
navigation_factory_codeexamples = Codebeispiele | ||
navigation_factory_help = Hilfe | ||
|
||
navigation_factory_start_title = Navigation Factory für REDAXO | ||
navigation_factory_start_example_link_internal = Interner Beispiellink | ||
navigation_factory_start_example_link_external = Externer Beispiellink | ||
navigation_factory_codeexamples_chapter_rex_nav = Hauptnavigation | ||
navigation_factory_codeexamples_chapter_rex_lang_nav = Sprachnavigation | ||
navigation_factory_codeexamples_chapter_rex_breadcrumb_nav = Breadcrumb Navigation | ||
|
||
navigation_factory_help_chapter_readme = Readme | ||
navigation_factory_help_chapter_changelog = Changelog | ||
navigation_factory_help_chapter_codeexamples = Codebeispiele | ||
navigation_factory_help_chapter_license = Lizenz | ||
|
||
navigation_factory_setup_step1 = Schritt 1: Mach dies | ||
navigation_factory_setup_step1_desc1 = Beschreibungstext 1 | ||
navigation_factory_setup_step2 = Schritt 2: Mach das | ||
navigation_factory_setup_step2_desc1 = Beschreibungstext 2 | ||
navigation_factory_setup_step3 = Schritt 3: Mach jenes | ||
navigation_factory_setup_step3_desc1 = Beschreibungstext 3 | ||
|
||
navigation_factory_config_ok = Einstellungen wurden aktualisiert. | ||
navigation_factory_config_error = Einstellungen konnte nicht gespeichert werden! | ||
navigation_factory_install_make_dir = Der Ordner "/redaxo/include/{0}/" kann nicht angelegt werden, überprüfen Sie die Schreibrechte oder legen Sie den Ordner von Hand an und geben ihm Schreibrechte. | ||
navigation_factory_install_perm_dir = Der Ordner "/redaxo/include/{0}/" benötigt Schreibrechte! | ||
|
||
navigation_factory_settings_foo = Foo | ||
navigation_factory_settings_foo2 = Foo2 | ||
navigation_factory_settings_save = Einstellungen speichern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
|
||
$mypage = rex_request('page','string'); | ||
$subpage = rex_request('subpage', 'string'); | ||
$chapter = rex_request('chapter', 'string'); | ||
$func = rex_request('func', 'string'); | ||
|
||
if ($chapter == '') { | ||
$chapter = ''; | ||
} | ||
|
||
// include markdwon parser | ||
if (!class_exists('Parsedown')) { | ||
require($REX['INCLUDE_PATH'] . '/addons/navigation_factory/classes/class.parsedown.inc.php'); | ||
} | ||
|
||
// chapters | ||
$chapterpages = array ( | ||
'' => array($I18N->msg('navigation_factory_codeexamples_chapter_rex_nav'), 'pages/codeexamples/rex_nav.inc.php'), | ||
'rex_lang_nav' => array($I18N->msg('navigation_factory_codeexamples_chapter_rex_lang_nav'), 'pages/codeexamples/rex_lang_nav.inc.php'), | ||
'rex_breadcrumb_nav' => array($I18N->msg('navigation_factory_codeexamples_chapter_rex_breadcrumb_nav'), 'pages/codeexamples/rex_breadcrumb_nav.inc.php') | ||
); | ||
|
||
// build chapter navigation | ||
$chapternav = ''; | ||
|
||
foreach ($chapterpages as $chapterparam => $chapterprops) { | ||
if ($chapterprops[0] != '') { | ||
if ($chapter != $chapterparam) { | ||
$chapternav .= ' | <a href="?page=' . $mypage . '&subpage=' . $subpage . '&chapter=' . $chapterparam . '">' . $chapterprops[0] . '</a>'; | ||
} else { | ||
$chapternav .= ' | <a class="rex-active" href="?page=' . $mypage . '&subpage=' . $subpage . '&chapter=' . $chapterparam . '">' . $chapterprops[0] . '</a>'; | ||
} | ||
} | ||
} | ||
$chapternav = ltrim($chapternav, " | "); | ||
|
||
// build chapter output | ||
$addonroot = $REX['INCLUDE_PATH']. '/addons/'.$mypage.'/'; | ||
$source = $chapterpages[$chapter][1]; | ||
|
||
// output | ||
echo ' | ||
<div class="rex-addon-output" id="subpage-' . $subpage . '"> | ||
<h2 class="rex-hl2" style="font-size:1em">' . $chapternav . '</h2> | ||
<div class="rex-addon-content"> | ||
<div class= "addon-template"> | ||
'; | ||
|
||
include($addonroot . $source); | ||
|
||
echo ' | ||
</div> | ||
</div> | ||
</div>'; | ||
|
||
?> | ||
|
||
<script type="text/javascript"> | ||
jQuery(document).ready(function($) { | ||
// make external links clickable | ||
$("#subpage-help").delegate("a", "click", function(event) { | ||
var host = new RegExp("/" + window.location.host + "/"); | ||
|
||
if (!host.test(this.href)) { | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
|
||
window.open(this.href, "_blank"); | ||
} | ||
}); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
|
||
echo rex_navigation_factory_utils::getHtmlFromMDFile('rex_breadcrumb_nav.md', array(), array(), true, true); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
|
||
echo rex_navigation_factory_utils::getHtmlFromMDFile('rex_lang_nav.md', array(), array(), true, true); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
|
||
echo rex_navigation_factory_utils::getHtmlFromMDFile('rex_nav.md', array(), array(), true, true); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters