Irgendwie funktioniert die Erweiterung um den Artikellink bei mir nicht. Was läuft da verkehrt ?
Bei mir werden nur die Links der Kategorien angezeigt, die Artikel werden nach wie vor nicht angezeigt.
Hier mal mein Code:
Modul-Navigationspfad:
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : Navigationpath
* Author(s) : Andreas Lindner
* Copyright : Contenido - four for business, Andreas Lindner
* Created : 05-08-2005
************************************************/
#Settings
$separator = '>';
$max_length = 65;
#Get path to root
$dummy = conCreateLocationString($idcat, ' '.$separator.' ', $retval, true, "navipath", 0, 1, true, false, $idartlang);
if ($retval=='') {
$retval=' ';
} else {
$pattern = "'>.*?<'";
preg_match_all($pattern, $retval, $matches);
$matches = $matches[0];
#Get effective text length
$length = 0;
foreach ($matches as $value) {
$length += strlen($value) - 2;
}
#Get shorten factor
if ($length > $max_length * 4) {
$shorten = 5;
}
elseif ($length > $max_length * 3) {
$shorten = 4;
}
elseif ($length > $max_length * 2) {
$shorten = 3;
}
elseif ($length > $max_length) {
$shorten = 2;
} else {
$shorten = 1;
}
#Shorten items
if ($length > $max_length) {
foreach ($matches as $value) {
if (strpos($value, $separator) === FALSE) {
$text = substr($value, 1, strlen($value) - 2);
$len = strlen($text);
if (strpos($text, ' ') === FALSE) {
$text_new = $text;
} else {
$text_new = capiStrTrimAfterWord($text, intval($len / $shorten));
}
if (strlen($text) != strlen($text_new)) {
$text_new .= '...';
}
$text_new = '>'.$text_new.'<';
$retval = str_replace('>'.$text.'<', $text_new, $retval);
}
}
}
$retval = str_replace('"/index.html"', '"Home/index.html"', $retval);
#$tmp = explode('<a ', $retval);
#$tmp[count($tmp)-1] = 'id="nav-path-last" '.$tmp[count($tmp)-1];
#$retval = implode('<a ', $tmp);
}
echo $retval;
?>
functions.con.php:
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : Navigationpath
* Author(s) : Andreas Lindner
* Copyright : Contenido - four for business, Andreas Lindner
* Created : 05-08-2005
************************************************/
#Settings
$separator = '>';
$max_length = 65;
#Get path to root
$dummy = conCreateLocationString($idcat, ' '.$separator.' ', $retval, true, "navipath", 0, 1, true, false, $idartlang);
if ($retval=='') {
$retval=' ';
} else {
$pattern = "'>.*?<'";
preg_match_all($pattern, $retval, $matches);
$matches = $matches[0];
#Get effective text length
$length = 0;
foreach ($matches as $value) {
$length += strlen($value) - 2;
}
#Get shorten factor
if ($length > $max_length * 4) {
$shorten = 5;
}
elseif ($length > $max_length * 3) {
$shorten = 4;
}
elseif ($length > $max_length * 2) {
$shorten = 3;
}
elseif ($length > $max_length) {
$shorten = 2;
} else {
$shorten = 1;
}
#Shorten items
if ($length > $max_length) {
foreach ($matches as $value) {
if (strpos($value, $separator) === FALSE) {
$text = substr($value, 1, strlen($value) - 2);
$len = strlen($text);
if (strpos($text, ' ') === FALSE) {
$text_new = $text;
} else {
$text_new = capiStrTrimAfterWord($text, intval($len / $shorten));
}
if (strlen($text) != strlen($text_new)) {
$text_new .= '...';
}
$text_new = '>'.$text_new.'<';
$retval = str_replace('>'.$text.'<', $text_new, $retval);
}
}
}
$retval = str_replace('"/index.html"', '"Home/index.html"', $retval);
#$tmp = explode('<a ', $retval);
#$tmp[count($tmp)-1] = 'id="nav-path-last" '.$tmp[count($tmp)-1];
#$retval = implode('<a ', $tmp);
}
echo $retval;
?>
Demo:
http://reifen-palacek.de/cms/front_content.php?idart=11
Wenn ich das richtig verstanden habe sollte ja hinter der Kategorie dann der Artikellink mit den Angaben die ich im Backend unter den Artikeleigenschaften als Titel angegeben habe erscheinen.
Oder bin ich da falsch ? Danke im Voraus.
Gruß Marxer