protected function renderNavbarMenuPage(AbstractPage $page, array $options, $depth, $prevDepth)
    {
        // Check for depth
        $html = '';
        
        if ($depth > $prevDepth) {
            // Start new ul tag
            $ulClass = $this->createNavbarMenuClass($page, $options['ulClass'], $depth);
            $html .= '<ul' . $ulClass . '>';
        } elseif ($depth < $prevDepth) {
            // Close open li/ul tags until we're at current depth
            for ($i = $prevDepth; $i > $depth; $i--) {
                $html .= '</li></ul>';
            }
            // Close previous li tag
            $html .= '</li>';
        } elseif ($depth == $prevDepth) {
            // Close previous li tag
            $html .= '</li>';
        }

        // Check for divider
        if ($page->get('divider')) {
            $html .= '<li class="divider"></li>';
        }
        
        // Check if page is empty
        if ($this->isPageEmpty($page)) {
            return $html;
        }
        
        // Add menu item
        $liClass = $this->createNavbarMenuItemClass($page, $options['addClassToLi'], $depth);
        $html .= '<li' . $liClass . '>' . $this->htmlify(
            $page,
            $options['addClassToLi'],
            $options['iconPosition'],
            $depth >= self::MAX_RENDER_DEPTH
        );

        return $html;
    }