コード例 #1
0
ファイル: menu_principal.php プロジェクト: wedesign-pf/code-g
                 $lienSRubRacine = "";
             }
             // chargement du contenu des sous sous rubriques
             $sRubs = array();
             if (is_array($listSSRUB)) {
                 if (count($listSSRUB) > 0) {
                     foreach ($listSSRUB as $idSSRUB => $nada) {
                         $datasSSRUB = $thisSite->pages[$idSSRUB];
                         $tempSS = array();
                         $tempSS["id"] = $idSSRUB;
                         $tempSS["classLI"] = "ssrub";
                         if ($datasSSRUB["page_type"] == "page") {
                             $tempSS["classLI"] .= " showLoader";
                         }
                         //list($tempSS["lien"],$tempSS["classA"])=OLDprepareMenuLink($lienRubRacine . $lienSRubRacine . $datasSSRUB["page_url"],$datasSSRUB["page_type"],"");
                         list($tempSS["lien"], $tempSS["classA"]) = prepareMenuLink($idSSRUB, $lienRubRacine . $lienSRubRacine, "");
                         $tempSS["titre"] = $datasSSRUB["titre"];
                         $sRubs[] = $tempSS;
                     }
                 }
             }
             $tempS["sRubs"] = $sRubs;
             $SRUBS[] = $tempS;
         }
     }
 }
 //echoa($SRUBS);
 $RUBS = array();
 $RUBS["id"] = $idRUB;
 $RUBS["classLI"] = $classLI;
 $RUBS["classA"] = $classA;
コード例 #2
0
ファイル: class.site.php プロジェクト: wedesign-pf/Tit
 public function loadUrlPages()
 {
     // page_url_menu = tableau par Menu des URL a utiliser dans les menus (avec arbo et type de page)
     // page_url_arbo = tableau par Menu des URL dans l'arborescence (sans le type de page)
     foreach ($this->menus as $menu => $pagesByMenu) {
         foreach ($pagesByMenu as $idRUB => $listSRUB) {
             $datasRUB = $this->pages[$idRUB];
             $racinelienRub = "";
             $lienRub = prepareMenuLink($datasRUB["page_type"], $racinelienRub, $datasRUB["page_url"]);
             $classLI = prepareMenuLinkClassLI($datasRUB["page_type"]);
             $classA = prepareMenuLinkClassA($datasRUB["page_type"]);
             if ($datasRUB["page_type"] == "page") {
                 $racinelienRub = $lienRub . "/";
             }
             if ($datasRUB["page_type"] == "firstSrub" && is_array($listSRUB)) {
                 if (count($listSRUB) > 0) {
                     $temp = array_keys($listSRUB);
                     $lienRub = $lienRub . "/" . $this->pages[$temp[0]]["page_url"];
                     $classLI = prepareMenuLinkClassLI($this->pages[$temp[0]]["page_type"]);
                     $classA = prepareMenuLinkClassA($this->pages[$temp[0]]["page_type"]);
                 }
             }
             $this->pages[$idRUB]["page_url_menu"][$menu] = $lienRub;
             $this->pages[$idRUB]["page_url_arbo"][$menu] = $datasRUB["page_url"];
             $this->pages[$idRUB]["classLI"] = $classLI;
             $this->pages[$idRUB]["classA"] = $classA;
             if (is_array($listSRUB) && count($listSRUB) > 0) {
                 foreach ($listSRUB as $idSRUB => $listSSRUB) {
                     $datasSRUB = $this->pages[$idSRUB];
                     $racinelienSRub = "";
                     $lienSRub = prepareMenuLink($datasSRUB["page_type"], $racinelienRub, $datasSRUB["page_url"]);
                     $classLI = prepareMenuLinkClassLI($datasRUB["page_type"]);
                     $classA = prepareMenuLinkClassA($datasRUB["page_type"]);
                     if ($datasSRUB["page_type"] == "page") {
                         $racinelienSRub = $racinelienRub . $lienSRub . "/";
                     }
                     $this->pages[$idSRUB]["page_url_menu"][$menu] = $lienSRub;
                     $this->pages[$idSRUB]["page_url_arbo"][$menu] = $datasRUB["page_url"] . "/" . $datasSRUB["page_url"];
                     $this->pages[$idSRUB]["classLI"] = $classLI;
                     $this->pages[$idSRUB]["classA"] = $classA;
                     if (is_array($listSSRUB) && count($listSSRUB) > 0) {
                         foreach ($listSSRUB as $idSSRUB => $nada) {
                             $datasSSRUB = $this->pages[$idSSRUB];
                             $lienSSRub = prepareMenuLink($datasSSRUB["page_type"], $racinelienSRub, $datasSSRUB["page_url"]);
                             $classLI = prepareMenuLinkClassLI($datasRUB["page_type"]);
                             $classA = prepareMenuLinkClassA($datasRUB["page_type"]);
                             $this->pages[$idSSRUB]["page_url_menu"][$menu] = $lienSSRub;
                             $this->pages[$idSSRUB]["page_url_arbo"][$menu] = $datasRUB["page_url"] . "/" . $datasSRUB["page_url"] . "/" . $datasSSRUB["page_url"];
                             $this->pages[$idSSRUB]["classLI"] = $classLI;
                             $this->pages[$idSSRUB]["classA"] = $classA;
                         }
                         // foreach($listSSRUB
                     }
                     // count($listSSRUB)>0
                 }
                 // foreach($listSRUB
             }
             // count($listSRUB)>0
         }
         // foreach($pagesByMenu
     }
     // foreach($this->menus
 }
コード例 #3
0
ファイル: menu_footer.php プロジェクト: wedesign-pf/code-g
<?php

$menu = "footer";
$menuPages = $thisSite->menus[$menu];
/////////////////////////////////////////////////
foreach ($menuPages as $idRUB => $listSRUB) {
    $datasRUB = $thisSite->pages[$idRUB];
    $classA = "showLoader";
    //list($lienRub,$classA)=OLDprepareMenuLink($datasRUB["page_url"],$datasRUB["page_type"],$classA);
    list($lienRub, $classA) = prepareMenuLink($idRUB, "", "");
    $RUBS = array();
    $RUBS["id"] = $idRUB;
    $RUBS["classA"] = $classA;
    $RUBS["lien"] = $lienRub;
    $RUBS["titre"] = $datasRUB["titre"];
    add_plan_du_site($menu, $idRUB, $lienRub, $datasRUB["titre"], $SRUBS);
    $smarty->append("RUBSBas", $RUBS);
}