Hallo zusammen
Die Frage die ich mir stelle ist das mein Template nicht die Navigation ausgibt.
hier mal das MainTemplate
<?
$navitemplate = new rex_template(2);
ini_set('arg_separator.output', '&');
ini_set ( "arg_separator.output", ";");
ini_set ( "url_rewriter.tags", "a=href");
// Code
////////////////////////////////////////////////////////////////////////////////
$article = OOArticle::getArticleById($REX['START_ARTICLE_ID'], $REX['CUR_CLANG']);
$articleK = $article->getValue("_keywords");
$articleD = $article->getDescription();
if($this->getValue("description") != "") {
$meta_beschreibung = htmlspecialchars($this->getValue("description"));
}
else {
$meta_beschreibung = htmlspecialchars($articleD);
}
if($this->getValue("keywords")!= "") {
$meta_suchbegriffe = htmlspecialchars($this->getValue("keywords"));
}
else {
$meta_suchbegriffe = htmlspecialchars($articleK);
}
$thisCat = OOCategory::getCategoryById($this->getValue('category_id'));
$rootCats = OOCategory::getRootCategories();
foreach($rootCats as $rootCat) {
if ($rootCat->isAncestor($thisCat) or $rootCat == $thisCat) {
$mainCatId = $rootCat->getId();
break;
}
}
$article = OOArticle::getArticleById($this->getValue("article_id"));
if (is_object($article)) {
$articleGlossi = $article->getValue("glossar");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<title>Profil von blabla</title>
<meta http-equiv="Content-Type" content="text/html ; charset=iso-8859-1" />
<meta name="Author" content="blabla" />
<link href="http://www.blabla.de/site/style.css" rel="stylesheet" type="text/css" />
<link rel="Shortcut Icon" href="http://www.blabla.de/site/img/favicon.ico" type="image/x-icon" />
</head>
<body>
<div id="main">
<div id="background-oben"></div>
<div id="background">
<div id="container">
<div id="header">
<img src="http://www.blabla.de/site/img/header.jpg" alt="Header von blabla" />
</div><!-- Ende header -->
<div id="navi">
<? include $navitemplate->getFile(); ?>
<div id="socialbookmarks">
</div><!-- Ende socialbookmarks -->
</div><!-- Ende navi -->
<div id="content">
<?php print $this->getArticle(); ?>
</div><!-- Ende content -->
<div class="clear"></div>
</div><!-- Ende Container -->
<div id="footer">
<div id="w3c">
</div><!-- Ende w3c -->
</div><!-- Ende footer -->
</div><!-- Ende background -->
<div id="background-unten"></div>
</div><!-- Ende main -->
</body>
</html>
und hier das NaviTemplate
<?php
//----------- Mainnavi
$path = explode( '|', $this->getValue("path").$this->getValue("article_id"));
array_shift( $path);
$cat_id = $path[0];
$subcat_id = $path[1];
echo '<ul id="navitemplate">';
foreach ( OOCategory::getRootCategories( true ) as $oCategory)
{
$name = htmlspecialchars($oCategory->getName());
$navtyp = $oCategory->getValue('navigationstyp');
$cid = $oCategory->getId();
$a = new article();
$a->setArticleId($cid);
$a->setCLang($REX['CUR_CLANG']);
$hasContent = OOArticleSlice::getFirstSliceForArticle($cid, $REX['CUR_CLANG']);
$children = OOCategory::getChildrenById($cid,true);
if(!$hasContent && $children[0])
$url = $children[0]->getUrl();
else
$url = $oCategory->getUrl();
if ($navtyp=='small')
{
echo '<li'.($cat_id == $cid ? ' class="aktiv"' : '').'><a href="'. $url .'" rel="nofollow">'.$name.'</a>';
//----------- Subnavi
if ($cat_id == $cid)
{
echo '<ul>';
foreach ( $children as $child)
{
$name2 = htmlspecialchars($child->getName());
$url2 = $child->getUrl();
$cid2 = $child->getId();
if ($cid2 == $subcat_id)
$item = '<li><a href="'. $url2 .'" class="aktiv" rel="nofollow">'. $name2 .'</a></li>';
else
$item = '<li><a href="'. $url2 .'" rel="nofollow">'. $name2 .'</a></li>';
echo $item;
} // ende children Loop
echo '</ul>';
} // ende categorie aktiv
echo '</li>';
} // ende navtyp=='small'
} // ende Kategorien Loop
echo '</ul>';
?>
Würde mich sehr über ne hilfreiche Antwort freuen.
MfG DStyle1988

