Kleiner Tipp: meine Variable $root bezieht sich auf das was im Backen Bereich unter "System" -> "$REX['SERVER']" eingetragen wurde. Ist sehr wichtig, damit die URLs gefunden werden.
- Code: Alles auswählen
<?php
$root = $REX['SERVER'];
// EXPLODE PATH
$PATH = explode("|",$this->getValue("path").$this->getValue("article_id")."|");
// GET CURRENTS
$path1 = (isset ($PATH[1])) ? $PATH[1] : '';
$path2 = (isset ($PATH[2])) ? $PATH[2] : '';
$path3 = (isset ($PATH[3])) ? $PATH[3] : '';
/*print $path1;
print $path2;
print $path3;*/
$linkPath_1 = rex_getUrl($path1,' ',' ');
$linkPath_2 = rex_getUrl($path2,' ',' ');
$linkPath_3 = rex_getUrl($path3,' ',' ');
if ($path1) {
$catPath_1 = OOCategory::getCategoryById($path1);
$namePath_1 = $catPath_1->getName();
$firstPathExists = '1';
}
else {
$firstPathExists = '';
}
if ($path2) {
$catPath_2 = OOCategory::getCategoryById($path2);
$namePath_2 = $catPath_2->getName();
$secondPathExists = '1';
}
else {
$secondPathExists = '';
}
if ($path3) {
$catPath_3 = OOCategory::getCategoryById($path3);
$namePath_3 = $catPath_3->getName();
$thirdPathExists = '1';
}
else {
$thirdPathExists = '';
}
print '<a class="navi_legende" href="'.$root.'index.php">Startseite</a>';
if ($firstPathExists) {
print ' > <a class="navi_legende" href="'.$linkPath_1.'">'.$namePath_1.'</a>';
}
if ($secondPathExists) {
print ' > <a class="navi_legende" href="'.$linkPath_2.'">'.$namePath_2.'</a>';
}
if ($thirdPathExists) {
print ' > <a class="navi_legende" href="'.$linkPath_3.'">'.$namePath_3.'</a>';
}
?>

