/** * Returns the number of levels to show. * * @return int * * @author Sascha Koehler <*****@*****.**> * @since 18.10.2012 */ public function getLevelsToShow() { if ($this->levelsToShow === null) { $level = SilvercartTools::getPageLevelByPageId($this->getStartPage()->ID); $level += 1; if ($this->showSiblings) { $level += 1; } $this->levelsToShow = $level; } return $this->levelsToShow; }