Seite 1 von 1

Navi mit Abstand

Verfasst: Sa 29. Dez 2007, 18:12
von rw72
Hallo,

ich nutze folgende Navi:

Code: Alles auswählen

<?php 
/*********************************************** 
* CONTENIDO MODUL - OUTPUT 
* 
* Modulname   :       vpNavigation 0.2a - schnell gehackte 4.6.x-Version 
* Author      :     Ingo van Peeren 
* Copyright   :     Ingo van Peeren (ingo@van-peeren.de) 
* Created     :     2005-03-30 
* Modified    :     2007-06-21 
************************************************/ 

cInclude("frontend", "includes/functions.navigation.php"); 

$hauptkategorie = "CMS_VALUE[0]"; 

$navitems = array(); 

function nav_feld ($cat) { 
global $client, $lang, $cfg, $idcat; 

        if (!is_object($db)) { 
            $db = new DB_Contenido; 
        } 
        $sql = "SELECT 
                     A.idcat, 
                     B.parentid, 
                     C.idcatlang, 
                     C.public, 
                     C.name,
                     C.startidartlang
                   FROM 
                     ".$cfg["tab"]["cat_tree"]." AS A, 
                     ".$cfg["tab"]["cat"]." AS B, 
                     ".$cfg["tab"]["cat_lang"]." AS C 
                   WHERE 
                     A.idcat     = B.idcat   AND 
                     A.level     <= '3'      AND
                     B.idcat     = C.idcat   AND 
                     B.idclient  = '$client' AND 
                     C.idlang    = '$lang'   AND 
                     C.visible   = '1'       AND 
                     B.parentid  = '$cat' 
                  ORDER BY 
                     A.idtree"; 

         $db->query($sql); 

         while ( $db->next_record() ) { 
            $aktiv = ""; 
            $sub_feld = nav_feld($db->f("idcat")); 
            if ($db->f("idcat") == $idcat) $aktiv = "active"; 
            elseif ($sub_feld["activepath"]) $aktiv = "activepath"; 
            $nav_feld[] = array("idcat"      => $db->f("idcat"), 
                                "name"       => $db->f("name"), 
                                "public"     => $db->f("public"), 
                                "startidartlang"     => $db->f("startidartlang"),                                 
                                "idcatlang"     => $db->f("idcatlang"), 
                                "active"     => $aktiv, 
                                "sub"        => $sub_feld); 
            if ($aktiv != "") $activepath = $aktiv; 
         } 
         $rv = array("feld"          => $nav_feld, 
                     "activepath"    => $activepath); 
         return $rv; 
} 

function liste ($array, $indent = "  ") 
{ 
global $first; 

       if (is_array($array["feld"])) { 
         if ($first) { 
           echo $indent . "<ul id=\"nav\">\n"; 
           $first = 0; 
         } 
         else echo $indent . "<ul>\n"; 
         foreach ($array["feld"] as $menupunkt) {                    

          $visible = checkCatPermission($menupunkt["idcatlang"],$menupunkt["public"]); 
          if ($visible) { 

           if ($menupunkt["active"] == "active") echo $indent . $indent . "<li id=\"active\">\n"; 
           elseif ($menupunkt["active"] == "activepath") echo $indent . $indent . "<li class=\"activepath\">\n"; 
           else echo $indent . $indent . "<li>\n"; 
           if (is_array($menupunkt["sub"]["feld"])) {
					   if ($menupunkt["startidartlang"] !='0') {
               echo $indent . $indent . $indent . "<a class=\"nav\" href=\"front_content.php?idcat=" . $menupunkt["idcat"] . "\">" . $menupunkt["name"] . "</a>\n"; 
               liste($menupunkt["sub"], $indent."    ");
						 } 
             else {
               echo $indent . $indent . $indent . "<a class=\"nav\">". $menupunkt["name"] . "</a>\n"; 
               liste($menupunkt["sub"], $indent."    ");
             }
           } 
           else 

					   if ($menupunkt["startidartlang"] !='0') {
				    	 echo $indent . $indent . $indent . "<a href=\"front_content.php?idcat=" . $menupunkt["idcat"] . "\">" . $menupunkt["name"] . "</a>\n"; 
               echo $indent . $indent . "</li>\n"; 
						 } 
             else {
    					 echo $indent . $indent . $indent . "<a class=\"nav\">".  $menupunkt["name"] . "</a>\n"; 
               echo $indent . $indent . "</li>\n"; 
             }					 

           } 
         } 
         echo $indent . "</ul>\n"; 
       } 
} 

/* Create Navigation Array */ 
$navitems = nav_feld($hauptkategorie); 

$first = 1; 

liste($navitems); 

?>
Ich würde aber gerne zwischen manchen Menupunkten einen Abstand schalten (Nicht alle) hat jemand eine Idee wie ich das am besten lösen kann?

Danke

Verfasst: Sa 12. Jan 2008, 11:43
von emergence
den ansatz hier
-> http://contenido.org/forum/viewtopic.ph ... dcat#45985
könntest du nutzen...