public static function createHtml($type = 'page', $depth = 0, $parentId = 1, $html = '')
{
$navigation = static::getCacheBuilder()->getNavigation(BL::getWorkingLanguage());
// check if item exists
if (isset($navigation[$type][$depth][$parentId])) {
// start html
$html .= '<ul>' . "\n";
// loop elements
foreach ($navigation[$type][$depth][$parentId] as $key => $aValue) {
$html .= "\t<li>" . "\n";
$html .= "\t\t" . '<a href="#">' . $aValue['navigation_title'] . '</a>' . "\n";
// insert recursive here!
if (isset($navigation[$type][$depth + 1][$key])) {
$html .= self::createHtml($type, $depth + 1, $parentId, '');
}
// add html
$html .= '</li>' . "\n";
}
// end html
$html .= '</ul>' . "\n";
}
// return
return $html;
}