{{indexmenu_n>15}} ====== {BREADCRUMB_ARTICLE[:[X]]} ====== **Alternative Möglickeit ein Brotkrümel-Menü zu erzeugen.** \\ Es wird zusätzlich der Artikeltitel ausgegeben. \\ Diese Ausführung arbeitet levelbasiert gegenüber dem eingebauten ID-basierten BREADCRUMB. (Zwei Ausführungen, **{BREADCRUMB_ARTICLE}** //(mit Start-Level im RT)// and **{BREADCRUMB_ARTICLE:[X]}** //(mit Start-Level im TAG)//). Sie können ein Start-Level definieren, ab dem die Ausgabe beginnt. //(Mit Level ist hier nicht die ID einer Kategorie gemeint, sondern die Nummer der Abstufung der Ebenen zueinander, siehe [[deutsch:navigationen:kleine-helfer:level-lift#grundlage_level_und_id|Grundlage Level und ID]])//. **Empfehlung:** Wenn nur ein Start-Level auf allen Seiten verwendet wird, sollte die erste Variante von BREADCRUMB_ARTICLE verwendet werden. ===== {BREADCRUMB_ARTICLE} ===== **{BREADCRUMB_ARTICLE}** //Die Ausgabe beginnt im eingestellten Level im RT // $_breadcrumb_start_level = [Level]; \\ ##Home > category_01 > category_01_03 > category_01_03_02 > Article-alias-Cat_01_03_03## \\ **rt_breadcrumb_article** V1.0 2009/07/11 Docu: -- \\ Forum: [[http://forum.phpwcms.org/viewtopic.php?p=118076#p118076]] **Autor:** Oliver Georgi http://phpwcms.de \\ **CMS Version:** >= 1.4.2 r334 \\ **Update:** 2009/07/12 OG to V1.1 //(Start-Level im RT hinzugefügt)// **Version:** V1.1 \\ Tag: **{BREADCRUMB_ARTICLE}** \\ Dateiname: **rt_breadcrumb_article.php** Verzeichnis: ** template/inc_script/frontend_render/ ** **Bedingung:** -> [[http://www.phpwcms-docu.de/confincphp_de.phtml|/config/phpwcms/conf.inc.php]] \\ * ##$phpwcms['allow_ext_render'] = 1;## \\ %PREFIX% Linktext %SUFFIX% $_breadcrumb_link_prefix = ''; $_breadcrumb_link_suffix = ''; // additional link attributes like class, rel, style // remember there is no active link - active (last) item has no link $_breadcrumb_link_attribute = 'class="breadcrumb-link"'; ////// Do not edit below //////// $_breadcrumb = array(); if(count($LEVEL_ID) > $_breadcrumb_start_level) { foreach($LEVEL_ID as $level => $item) { if($level < $_breadcrumb_start_level) { continue; } if($content['struct'][$item]["acat_hidden"] == false) { $_breadcrumb[] = getStructureLevelLink( ($content['cat_id'] == $item && $content['list_mode']) ? $content['struct'][$item]['acat_name'] : $content['struct'][$item], $_breadcrumb_link_attribute, $_breadcrumb_link_prefix, $_breadcrumb_link_suffix ); } } } // Article if($aktion[1]) { $_breadcrumb[] = html_specialchars( $content['article_title'] ); } $_breadcrumb = implode($_breadcrumb_spacer, array_diff( $_breadcrumb , array('', NULL) ) ); $content['all'] = str_replace('{BREADCRUMB_ARTICLE}', $_breadcrumb, $content['all']); } ?> \\ ===== {BREADCRUMB_ARTICLE:X} ===== **{BREADCRUMB_ARTICLE:[Start-Level]}** Erweiterte Version des vorherigen RTs. Das Start-Level wird im aufrufenden TAG übergeben. Z.B. mit der gegebenen Struktur: **{BREADCRUMB_ARTICLE:0}** //Die Ausgabe beginnt in Level 0// \\ ##Home > category_01 > category_01_03 > category_01_03_02 > Article-alias-Cat_01_03_03## **{BREADCRUMB_ARTICLE:2}** //Die Ausgabe beginnt in Level 2// \\ ##category_01 > category_01_03 > category_01_03_02 > Article-alias-Cat_01_03_03## **{BREADCRUMB_ARTICLE:3}** //Die Ausgabe beginnt in Level 3// \\ ##category_01_03_02 > Article-alias-Cat_01_03_03## \\ **rt_breadcrumb_article_start** V1.1 2009/07/11 Docu: -- \\ Forum: [[http://forum.phpwcms.org/viewtopic.php?p=118076#p118076]] ---- **Autor:** Oliver Georgi http://phpwcms.de \\ **Enhanced by:** K.Heermann (flip-flop) http://planmatrix.de \\ **CMS Version:** >= 1.4.2 r334 \\ **Version:** V1.1 \\ Tag: **{BREADCRUMB_ARTICLE:[start-level]}** \\ Dateiname: **rt_breadcrumb_article_start.php** Verzeichnis: ** template/inc_script/frontend_render/ ** **Bedingung:** -> [[http://www.phpwcms-docu.de/confincphp_de.phtml|/config/phpwcms/conf.inc.php]] \\ * ##$phpwcms['allow_ext_render'] = 1;## \\ '; $_breadcrumb_link_suffix = ''; $_breadcrumb_link_attribute = 'class="breadcrumb-link"'; // $matches[1][X] = startlevel of {BREADCRUMB:[X]} // $matches[1][0,1,2,3...] = Count of {BREADCRUMB:[X]} tags foreach ($matches[1] as $key_start => $item_start) { // More than one breadcrumb tags? $_breadcrumb = array(); foreach($LEVEL_ID as $key => $item) { if( ($content['struct'][$item]["acat_hidden"] == false) AND ($matches[1][$key_start] <= $key) ) { // start level <= level $_breadcrumb[] = getStructureLevelLink( // Two output versions. Enable/disable the two following lines and vice versa // ---- all categories have a link tag besides at article listing // ($content['cat_id'] == $item && $content['list_mode']) ? $content['struct'][$item]['acat_name'] : $content['struct'][$item], // ---- // ==== All categories have a link tag at all $content['struct'][$item], // ==== $_breadcrumb_link_attribute, $_breadcrumb_link_prefix, $_breadcrumb_link_suffix ); } } // Article: if there is a category set if($aktion[1] AND !empty($_breadcrumb)) { $_breadcrumb[] = html_specialchars( $content['article_title'] ); } $_breadcrumb = implode($_breadcrumb_spacer, array_diff( $_breadcrumb , array('', NULL) ) ); $content["all"] = preg_replace('/\{BREADCRUMB_ARTICLE\:'.$matches[1][$key_start].'\}/', $_breadcrumb, $content["all"]); } } ?>