meine navigation soll stets ganz ersichtlich sein. sprich, alle unterrubriken sollen dargestellt werden.
dazu dachte ich mir, nehme ich am besten das sitemapmodul.
soweit auch alles bene. jetzt sollen jedoch die hauptrubriken keine links enthalten, sondern nur als überschriften fungieren.
dazu habe ich eine modulvorlage erstellt:
Code: Alles auswählen
<ul class="sitemapStandardMainCat">
<li class="sitemapStandardLevel_1">
<h2>{list_h2} </h2>
<ul>
{list_items}
</ul>
</li>
</ul>
somit möchte ich aus meinem modul einmal an den platzhalter {list_h2} die hauptrubriken übergeben und an das {list_items} die jeweiligen unterrubriken.
habe das sitemapmodul noch so abgeändert, dass keine konfiguration nötig ist (standardmässig hat die sitemap ja ne konfi)
das ist der code für den modul-output:
Code: Alles auswählen
<?php
if (!isset($db)) {
$db = new DB_Contenido();
}
if (!isset($tpl)) {
$tpl = new Template();
}
$tpl->reset();
cInclude('classes', 'Contenido_FrontendNavigation/Contenido_FrontendNavigation.class.php');
cInclude('frontend', 'includes/Util/Modules/Contenido_Sitemap_Util.class.php');
$iStartIdcat = getEffectiveSetting('navigation', 'idcat-home', 1);
$iSelectedDepth = getEffectiveSetting('navigation', 'level-depth', 3);
$iHtmlOutputType = intval("CMS_VALUE[3]");
$sUrlStyle = $cfg['url_builder']['name'];
if ($iStartIdcat > 0 && $iSelectedDepth >= 0) {
$oFeNav = new Contenido_FrontendNavigation($db, $cfg, $client, $lang, $cfgClient);
$oFeNav->setAuth($auth);
$oFeNav->setRootCat($iStartIdcat);
$oSubCategories = $oFeNav->getSubCategories($iStartIdcat, true, true, 1);
// see if there are any subcategories to display
if ($oSubCategories->count() > 0) {
$aLevelInfo = array();
$aDepthInfo = $iSelectedDepth;
if ($iHtmlOutputType == 1) {
$sMainCats = '';
}
foreach ($oSubCategories as $oSubCategory) {
switch($iHtmlOutputType) {
case 0:
Contenido_Sitemap_Util::loopCats($oSubCategory, $oFeNav, $tpl, $sUrlStyle, $cfg, $lang, $aLevelInfo, intval($idcat), $aDepthInfo);
break;
case 1:
Contenido_Sitemap_Util::loopCats($oSubCategory, $oFeNav, $tpl, $sUrlStyle, $cfg, $lang, $aLevelInfo, intval($idcat), $aDepthInfo);
$sSubCats = $tpl->generate('templates/navigationMAIN_standard_h2.html', true);
$tpl->reset();
$tpl->set('s', 'list_h2', $sSubCats);
$sMainCats .= $tpl->generate('templates/navigationMAIN_standard_ul.html', true);
break;
default:
break;
}
}
if ($iHtmlOutputType == 0) {
$tpl->generate('templates/navigationMAIN_standard.html');
} else {
echo $sMainCats;
}
}
} else {
echo '<p>Sitemap not configured correctly.</p>';
}
?>
alle meine bisherigen test sind missglückt. bin auch kein geübter php-anwender, darum sehe ich gerade keine lösung.
freue mich über euren input und schon mal vielen dank im voraus.
grüsse