- Code: Alles auswählen
<?
$cat = OOCategory::getCategoryById($this->getValue(category_id));
$cats = $cat->getChildren();
asort($cats);
if (is_array($cats))
{
foreach ($cats as $cat)
{
$catId = $cat->getId();
$catName = $cat->getName();
$article = $cat->getArticles();
if (is_array($article))
{
foreach ($article as $var)
{
$articleId = $var->getId();
$articleName = $var->getName();
$articleDescription = $var->getDescription();
$teaserbild = $var->_art_file;
$keywords = $var->_art_keywords;
$count++;
if($count == 3 || $count == 6 || $count == 9 || $count == 12 || $count == 15 || $count == 18) {
print '<div class="boxLast">'; }
else {
print '<div class="box">';
}
print '<a href="'.rex_getUrl($articleId).'"><img src="files/'.$teaserbild.'" alt="'.$keywords.'"/></a>';
print '</div>';
}
}
}
}
?>
Hier mit kann ich mir die Kategorien ausgeben - leider werden auch die Artikel in der Unterkategorie ausgegeben. Wie kann ich denn nur die Unterkategorien ausgaben lassen ohne die sich darin befindeten Artikel. Der Startartikel muss, weil ich hier auch die Metainfo drinne habe?
Struktur:
- Hauptkategorie
--- Unterkategorie
------ Artikel
------ Artikel
--- Unterkategorie
--- Unterkategorie

