protected function getParentSlugs(WebViewInterface $view, array $slugs)
    {
        $parent = $view->getParent();

        if ($parent !== null) {
            if (!(method_exists($parent, 'isHomepage') && $parent->isHomepage())) {
                array_push($slugs, $parent->getSlug());
            }

            if ($parent->getParent() !== null) {
                $slugs = $this->getParentSlugs($parent, $slugs);
            }
        }

        return array_unique($slugs);
    }