public function Breadcrumbs(
        $maxDepth = 20,
        $unlinked = false,
        $stopAtPageType = false,
        $showHidden = false,
        $delimiter = '&raquo;'
    ) {
        $page = $this;
        $pages = [];

        while ($page
            && (!$maxDepth || count($pages) < $maxDepth)
            && (!$stopAtPageType || $page->ClassName != $stopAtPageType)
        ) {
            if ($showHidden || $page->ShowInMenus || ($page->ID == $this->ID)) {
                $pages[] = $page;
            }

            $page = $page->Parent;
        }

        // Add on the item we're currently showing.
        $controller = Controller::curr();
        if ($controller) {
            $request = $controller->getRequest();
            if ($request->param('Action') == 'show') {
                $id = $request->param('ID');
                if ($id) {
                    $object = DataObject::get_by_id($this->getDataClass(), $id);
                    array_unshift($pages, $object);
                }
            }
        }

        $template = SSViewer::create('BreadcrumbsTemplate');

        return $template->process($this->customise(ArrayData::create([
            'Pages' => ArrayList::create(array_reverse($pages))
        ])));
    }