protected function _renderNested(ItemInterface $item, array $options)
    {
        if (!$item->hasChildren() ||
            $options['depth'] === 0 ||
            !$item->getDisplayChildren()
        ) {
            return '';
        }

        $templater = $this->templater();

        $attributes = $this->_formatAttributes($options['attributes'], $item);
        unset($options['attributes']);

        $templateVars = $options['templateVars'];
        unset($options['templateVars']);

        $newTemplates = $options['childrenTemplates'];
        unset($options['childrenTemplates']);
        if ($newTemplates) {
            $templater->push();
            $templater->add($newTemplates);
        }

        $items = $this->_renderChildren($item, $options);

        if ($newTemplates) {
            $templater->pop();
        }

        return (string)$templater->format('nest', [
            'attrs' => $attributes,
            'templateVars' => $templateVars,
            'items' => $items
        ]);
    }