/** * @see \cms\system\content\type\IContentType::getOutput() */ public function getOutput(Content $content) { $childIDs = ContentCache::getInstance()->getChildIDs($content->contentID); $children = array(); foreach ($childIDs as $childID) { $children[] = ContentCache::getInstance()->getContent($childID); } WCF::getTPL()->assign(array('children' => $children)); return parent::getOutput($content); }
/** * @see \cms\system\content\type\IContentType::getOutput() */ public function getOutput(Content $content) { switch ($content->type) { case "children": $menuItems = $content->getPage()->getChildrenTree($content->depth ? intval($content->depth) - 1 : null); break; case "all": $nodeTree = new AccessiblePageNodeTree(); $menuItems = $nodeTree->getIterator(); if ($content->depth) { $menuItems->setMaxDepth(intval($content->depth) - 1); } break; } WCF::getTPL()->assign(array('menuItems' => $menuItems)); return parent::getOutput($content); }