Dabei habe ich versucht so viel wie möglich Contenido-eigene Funktionen zu benutzen.
Hier also das modul "breadcrumb", ich stelle aber auch (wenn ich's schaff) übers Woende noch die xml-files online.
In Beschreibung:
Code: Alles auswählen
MODUL : breadcrumb 1.0
Contenido-Ver.: > 4.5.x (not tested with lower versions)
Author : Ortwin Pinke
Copyright :
Created : 2005-08-25
Please enter modifications in the following format
and do a comment in source code
then please send file to module@dceonline.de, thx
Modified : YYYY-DD-MM
Modified by : name of modifier
reason for modification?
Beschreibung:
Das Modul zeigt den "breadcrumb"-Pfad (breadcrumb = Brotkrumen) ausgehend
von der aktuellen Kategorie bis zum Stammverzeichnis als Kategorienamen mit
einem Seperator dazwischen.
Folgende Einstellungen im Backend sind möglich:
Als Link anzeigen: Jeder Kategoriename ist verlinkt, ansonsten nur Text.
1. Kategorie nicht anzeigen: Das Level 0 wird hier ein- oder ausgeblendet
Zeichen für Seperator: hier kann ein alphanum. Zeichen als Seperator eingegeben werden
(standard >). Vor und nach dem Zeichen wird standardmässig
ein Leerzeichen eingefügt.
In die 'format.css' wird die beigefügte 'breadcrumb.css' per CopyandPaste am ende eingefügt.
<<< Todo >>>
- Bild als Seperator
- Vardefinition in array, damit auch leichteres unset
- Zuschaltbare Anzeige des aktuellen Artikels
Für Anregungen, Vorschläge und Verbesserungen bin ich wie immer dankbar
Code: Alles auswählen
/***********************************************
* CONTENIDO MODUL - INPUT
*
* MODUL : breadcrumb 1.0
* Contenido-Ver.: > 4.5.x (not tested with lower versions)
*
* Author : Ortwin Pinke
* Copyright :
* Created : 2005-08-25
*
* Please enter modifications in the following format
* and do a comment in source code
* then please send file to module@dceonline.de, thx
*
* Modified : YYYY-DD-MM
* Modified by : name of modifier
* reason for modification?
*
************************************************/
// include needed functions
cInclude("includes", "functions.forms.php");
// set constant variable
$input_field_width = 30;
$input_field_maxlen = 10;
// set var names
$var_show_with_link = "CMS_VAR[0]";
$var_show_first_element = "CMS_VAR[1]";
$var_seperator_breadcrumb = "CMS_VAR[2]";
$show_with_link = "CMS_VALUE[0]";
$show_first_element = "CMS_VALUE[1]";
$seperator_breadcrumb = "CMS_VALUE[2]";
// output form
echo '<table cellspacing="0" cellpadding="10" border="0">
<tr valign="top">
<td>'.mi18n("Show with link:").'</td><td>';
echo formGenerateCheckbox($var_show_with_link, "enabled", (($show_with_link != "enabled")?false:true), mi18n("Yes")).'</td></tr>';
echo '<tr valign="top">
<td>'.mi18n("Don't show first cat:").'</td><td>';
echo formGenerateCheckbox($var_show_first_element, "enabled", (($show_first_element != "enabled")?false:true), mi18n("Yes")).'</td></tr>';
echo '<tr valign="top"><td>'.mi18n("Sign(s) for separator:").'</td><td>';
echo formGenerateField ("text", $var_seperator_breadcrumb, $seperator_breadcrumb, $input_field_width, $input_field_maxlen).'</td></tr>';
echo "</table>";
Code: Alles auswählen
<?PHP
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* MODUL : breadcrumb 1.0
* Contenido-Ver.: > 4.5.x (not tested with lower versions)
*
* Author : Ortwin Pinke
* Copyright :
* Created : 2005-08-25
*
* Please enter modifications in the following format
* and do a comment in source code
* then please send file to module@dceonline.de, thx
*
* Modified : YYYY-DD-MM
* Modified by : name of modifier
* reason for modification?
*
************************************************/
// include functions
cInclude("includes", "functions.con.php");
// set vars
$show_with_link = "CMS_VALUE[0]";
$show_first_element = "CMS_VALUE[1]";
$seperator_breadcrumb = "CMS_VALUE[2]";
$linkClass_breadcrumb = "linkbreadcrumb";
$textClass_breadcrumb = "textbreadcrumb";
$sepClass_breadcrumb = "sepbreadcrumb";
$ausgabe = "";
$firstTreeElementToUse = "";
// set default if variables not set
if ($show_with_link == "enabled"){
$show_with_link = true;
}else{
$show_with_link = false;
}
if ($show_first_element == "enabled"){
$firstTreeElementToUse = 1;
}else{
$firstTreeElementToUse = 0;
}
if ($seperator_breadcrumb == ""){
$seperator_breadcrumb = htmlspecialchars(" > ");
}else{
$seperator_breadcrumb = " ".htmlspecialchars($seperator_breadcrumb)." ";
}
// make breadcrumb path
conCreateLocationString($idcat, $seperator_breadcrumb, $ausgabe, $show_with_link, $linkClass_breadcrumb, $firstTreeElementToUse);
// format output
if ($show_with_link) {
echo "<div class=\"".$sepClass_breadcrumb."\">".$ausgabe."</div>";
}else{
echo "<div class=\"".$textClass_breadcrumb."\">".$ausgabe."</div>";
}
// unset variables
unset($show_with_link);
unset($show_first_element);
unset($seperator_breadcrumb);
unset($ausgabe);
unset($firstTreeElementToUse);
unset($linkClass_breadcrumb);
unset($textClass_breadcrumb);
unset($sepClass_breadcrumb);
?>
Code: Alles auswählen
/* CSS breadcrumb */
A.linkbreadcrumb:link {font-family: Arial, Helvetica, sans-serif; font-size:10; font-weight: bold; text-decoration: none; color: #000000}
A.linkbreadcrumb:visited {font-family: Arial, Helvetica, sans-serif; font-size:10; font-weight: bold; text-decoration: none; color: #000000}
A.linkbreadcrumb:hover {font-family: Arial, Helvetica, sans-serif; font-size:10; font-weight: bold; text-decoration: none; color: #FF0000}
A.linkbreadcrumb:active {font-family: Arial, Helvetica, sans-serif; font-size:10; font-weight: bold; text-decoration: none; color: #00FF00}
.textbreadcrumb {
border: 0px;
background-color: #FFFFFF;
padding-left: 0px;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: normal;
font-weight: normal;
font-variant: normal;
color: #000000;
}
.sepbreadcrumb {
border: 0px;
background-color: #FFFFFF;
padding-left: 0px;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: normal;
font-weight: normal;
font-variant: normal;
color: #000000;
}
/* CSS breadcrumb end */
Die Todo-Liste steht in der Beschreibung und ich werde sie in der nächsten Version mit einbauen.
Das Modul in Funktion gibts leider zur Zeit noch nicht zu sehen
Aber sobald die Kundendomain online ist poste ich den link hier.
Na dann viel Spaß damit
Gruß aus dem heut mal sonnigen Frankenland
Ortwin