altes Problem, wieder neu.
Ich hatte schon früher (noch auf Redaxo 2.7) durch die Hilfe von Jan (danke nochmals ) bei meiner Website http://www.susannewarnichtfrei.net/index_redaxo.php das die Textlinks durch automatisch generierte Bildlinks ersetzt. Eine Folgeseite http://www.susannewarnichtfrei.net/inde ... 882cc4007f. Die Seite läuft derweil nur im Hintergrund, deswegen stimmt die index.php nicht mehr.
Das wurde gemacht durch folgenden code der in der navigation steht:
Code: Alles auswählen
<?
// PFAD AUSLESEN
$cat_id = $this->getValue("category_id");
$path = explode("-",$this->getValue("path"));
$showpath = "/ <a href=index.php?article_id=8 class=white>Home</a>";
$cat1 = current($path)+0;
next($path);
$cat2 = current($path)+0;
next($path);
$cat3 = current($path)+0;
// 1. NAVI
$NAV1 = "";
$NAV1COUNTER = 0;
$cat_id = 0;
@include $REX[INCLUDE_PATH]."/generated/categories/$cat_id.list.category";
$NAV = $REX[RECAT][$cat_id];
for ($i=0;$i<count($NAV);$i++)
{
$id = current($NAV);
$aid = $REX[CAT][$id][article_id];
$name = $REX[CAT][$id][name];
$name2 = $REX[CAT][$id][name];
$bildname = $REX[CAT][$id][article_id]."_a.png";
$height = createImage(
$name2,
$REX[INCLUDE_PATH]."/../../pics/font/MyriadPro-Bold.otf",
$REX[INCLUDE_PATH]."/../../pics/mainnavi/$bildname",
8, //schriftgrösse
50,
12, //höhe der datei
83, //breite der datei
9,
"white",
"green");
if ($i==0) $NAV1 .= "<table width=100% cellpadding=0 cellspacing=0 border=0>";
@include $REX[INCLUDE_PATH]."/generated/articles/$aid.article";
if ($cat2==$id and $REX[CAT][$id][status]==1)
{
$NAV1 .= "<tr><td width=10><img src=$REX[HTDOCS_PATH]pics/catnavi/pic.gif width=10 height=17 border=0></td><td><a href=index.php?article_id=$aid><img src=$REX[HTDOCS_PATH]pics/mainnavi/$bildname width=83 height=12 border=0></a></td></tr>";
$NAV1COUNTER++;
}elseif ($REX[CAT][$id][status]==1)
{
$NAV1 .= "<tr><td width=10><img src=$REX[HTDOCS_PATH]pics/catnavi/pic2.gif width=10 height=17 border=0></td><td><a href=index.php?article_id=$aid><img src=$REX[HTDOCS_PATH]pics/mainnavi/$bildname width=83 height=12 border=0></a></td></tr>";
$NAV1COUNTER++;
}
if (($i+1)==count($NAV)) $NAV1 .= "</table>";
next($NAV);
}
// 2. NAVI
$NAV2 = "<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td valign=top>";
$NAV2COUNTER = 0;
$cat_id = $cat2;
@include $REX[INCLUDE_PATH]."/generated/categories/$cat_id.list.category";
$NAV = $REX[RECAT][$cat_id];
for ($i=0;$i<count($NAV);$i++)
{
$id = current($NAV);
$aid = $REX[CAT][$id][article_id];
$name = $REX[CAT][$id][name];
$name2 = $REX[CAT][$id][name];
$bildname = $REX[CAT][$id][article_id]."_a.png";
$height = createImage(
$name2,
$REX[INCLUDE_PATH]."/../../pics/font/MyriadPro-Bold.otf",
$REX[INCLUDE_PATH]."/../../pics/subnavi/$bildname",
8, //schriftgrösse
50,
12,
93,
9,
"white",
"green");
if ($i==0) $NAV2 .= "<table width=100% cellpadding=0 cellspacing=0 border=0>";
@include $REX[INCLUDE_PATH]."/generated/articles/$aid.article";
if ($cat3==$id and $REX[CAT][$id][status]==1)
{
$NAV2 .= "<tr><td width=10><img src=$REX[HTDOCS_PATH]pics/catnavi/pic_weiter.gif width=10 height=17 border=0></td><td><a href=index.php?article_id=$aid><img src=$REX[HTDOCS_PATH]pics/subnavi/$bildname width=93 height=12 border=0></a></td></tr>";
$NAV2COUNTER++;
}elseif ($REX[CAT][$id][status]==1)
{
$NAV2 .= "<tr><td width=10 align=center><img src=$REX[HTDOCS_PATH]pics/catnavi/pic2.gif width=10 height=17 border=0></td><td><a href=index.php?article_id=$aid><img src=$REX[HTDOCS_PATH]pics/subnavi/$bildname width=93 height=12 border=0></a></td></tr>";
$NAV2COUNTER++;
}
if ($NAV1COUNTER<=$NAV2COUNTER)
{
$NAV2 .= "</table></td><td valign=top><table width=100% cellpadding=0 cellspacing=0 border=0>";
$NAV2COUNTER = 0;
}
if (($i+1)==count($NAV)) $NAV2 .= "</table>";
next($NAV);
}
$NAV2 .= "</td></tr></table>";
echo "<table cellpadding=0 cellspacing=0 border=0><tr><td valign=top>$NAV1</td><td valign=top width=10 background=$REX[HTDOCS_PATH]pics/catnavi/trennline.gif> </td><td valign=top>$NAV2</td></tr></table>";
echo "<br><br>";
?>
Code: Alles auswählen
<?php
// EXPLODE PATH
$PATH = explode("|",$this->getValue("path").$this->getValue("article_id")."|");
// GET CURRENTS
$path1 = $PATH[1];
$path2 = $PATH[2];
$path3 = $PATH[3];
/* START 1st level categories */
$nav .= '<ul class="nav1st">';
foreach (OOCategory::getRootCategories() as $lev1) {
if ($lev1->isOnline(true)):
if ($lev1->getId() == $path1) {
$nav .= '<li class="active"><a class="current" href="'.$lev1->getUrl().'">'.$lev1->getName().'</a>';
}
// 2nd level - no active link
else {
$nav .= '<li><a href="'.$lev1->getUrl().'">'.$lev1->getName().'</a>';
}
// 1st level had categories? -> go on
$lev1Size = sizeof($lev1->getChildren());
if ($lev1->getId() == $path1) {
if ($lev1Size != "0") {
$nav .= '<ul class="nav2nd">';
// START 2nd level categories
foreach ($lev1->getChildren() as $lev2):
if ($lev2->isOnline(true)) {
// 2nd level - active link
if ($lev2->getId() == $path2) {
$nav .= '<li class="active"><a class="current" href="'.$lev2->getUrl().'">'.$lev2->getName().'</a>';
}
// 2nd level - no active link
else {
$nav .= '<li><a href="'.$lev2->getUrl().'">'.$lev2->getName().'</a>';
}
// 2nd level had categories? -> go on
$lev2Size = sizeof($lev2->getChildren());
if ($lev2->getId() == $path2) {
if ($lev2Size != "0") {
$nav .= '<ul class="nav3rd">';
// START 3rd level categories
foreach ($lev2->getChildren() as $lev3):
if ($lev3->isOnline(true)) {
// 3rd level - active link
if ($lev3->getId() == $path3) {
$nav .= '<li class="active"><a class="current" href="'.$lev3->getUrl().'">'.$lev3->getName().'</a></li>';
}
// 3rd level - no active link
else {
$nav .= '<li><a href="'.$lev3->getUrl().'">'.$lev3->getName().'</a></li>';
}
}
endforeach;
// END 3rd level categories
$nav .= '</ul>';
} // END by if ($lev2Size != "0"):
}
$nav .= '</li>';
}
endforeach;
// END 2nd level categories
$nav .= '</ul>';
} // END by if ($lev1Size != "0"):
}
$nav .= '</li>';
endif; // END by if ($lev1->isOnline())
}
$nav .= '</ul>';
// END 1st level categories
print $nav;
?>
Das ganze sollte irgendwann so aussehen.
http://www.susannewarnichtfrei.net/blog/entwurf.jpg
http://www.susannewarnichtfrei.net/blog ... klappt.jpg
Der Hintergrund soll wahrscheinlich random sein. oder ich mach verschiedene Templates. Das ist aber derzeit noch nicht wichtig.
So lange Rede, kurzer Sinn:
Weiss jemand Rat? Oder hat jemand einen Anstoß in die richtige Richtung, auch ein Arschtritt wäre mir recht?
Danke
Hans von der Susanne