Override {@link LeftAndMain} Link to allow blank URL segment for CMSMain.

@param string|null $action Action to link to.
@return string
965521
public function Link($action = null)
    {
        $link = Controller::join_links(
            AdminRootController::admin_url(),
            $this->config()->get('url_segment'), // in case we want to change the segment
            '/', // trailing slash needed if $action is null!
            "$action"
        );
        $this->extend('updateLink', $link);
        return $link;
    }
591278
public function Link($action = 'tag/')
    {
        if ($config = SiteConfig::current_site_config()->TagAction) {
            $action = $config . '/';
        }
        /** @var NewsHolderPage $Page */
        if ($Page = NewsHolderPage::get()->first()) {
            return $Page->Link($action . $this->URLSegment);
        }

        return false;
    }
193407
public function bestUrl(string $action): string
    {
        if ($this->viaAjax($action) || $this->viaApi($action)) {
            return home_url('/'); // Both ride on index.
        } elseif ($this->Wp->is_admin && ($this->s::isOwnMenuPage() || $this->s::isOwnMenuPageTab())) {
            return $this->urlRemove($this->c::currentUrl());
        } elseif ($this->Wp->is_admin && $action === '§dismiss-notice') {
            return $this->urlRemove($this->c::currentUrl());
        } elseif ($this->Wp->is_admin) {
            return self_admin_url('/');
        }
        return home_url('/'); // Fallback (default).
    }
491559
protected function action($action)
    {
        $action = in_array($action, $this->actions) ? $action : null;
        $action = array_key_exists($action, $this->aliases) ? $this->aliases[$action] : $action;

        return $action;
    }
347093
public function getSideMenu($action, AdminInterface $childAdmin = null)
    {
        if ($this->isChild()) {
            return $this->getParent()->getSideMenu($action, $this);
        }

        $this->buildSideMenu($action, $childAdmin);

        return $this->menu;
    }
591106
public function Link($action = '')
    {
        if ($parent = $this->Parent()) {
            return $parent->Link($action) . '#' . $this->Permalink();
        }
    }
300384
public static function appUrl($action = null, $params = array(), $useIndex = true)
    {
        return self::url($action, $params, $useIndex, false);
    }
852427
public static function actionFilename($action, $dirs = null, $useNamespaces = false)
    {
        $dirs = self::path($dirs ?: self::get('atomik.dirs.actions'));
        if (($filename = self::findFile("$action.php", $dirs, $useNamespaces)) === false) {
            return $useNamespaces ? false : self::findFile("$action/index.php", $dirs);
        }
        return $filename;
    }
1202662
public function Link($action = '')
    {
        $link = Controller::join_links(
            Director::baseURL(),
            Config::inst()->get('DocumentationViewer', 'link_base'),
            $this->getLanguage(),
            $action,
            '/'
        );

        return $link;
    }
225225
protected function definingClassForAction($action)
    {
        $definingClass = parent::definingClassForAction($action);
        if ($definingClass) {
            return $definingClass;
        }

        $class = static::class;
        while ($class != 'SilverStripe\\Control\\RequestHandler') {
            $templateName = strtok($class, '_') . '_' . $action;
            if (SSViewer::hasTemplate($templateName)) {
                return $class;
            }

            $class = get_parent_class($class);
        }

        return null;
    }
81535
public function createUrl(string $action, ?DataMap $params = null, bool $isFullUrl = false, array $fullUrlInfo = []): string
    {
        list ($moduleName, $controllerName, $actionName) = Application::$app->getFullAction($action);
        $resourcePath = $this->routeHandler->createUrl($moduleName, $controllerName, $actionName, $params);
        return $this->getPublicUrl($resourcePath, $isFullUrl, $fullUrlInfo);
    }
683924
public function RelativeLink($action = null) {
		$remoteObject = $this->ContentItem();
		if (!is_string($action)) {
			$action = null;
		}
		if ($remoteObject) {
			return $this->LinkFor($remoteObject, $action ? $action : 'view');
		}
		return parent::RelativeLink($action);
	}
460841
protected function normalizeAction(string $action): string
    {
        $action = strtolower($action);
        $action = str_replace(['_', '-', '.'], ' ', $action);
        $action = ucwords($action);
        $action = str_replace(' ', '', $action);
        $action = lcfirst($action);

        return $action;
    }
1048694
public function getActionUrl($action)
    {
        if (is_array($action->urlData) && $this->isOpenNewWindow)
        {
            $action->url = BackendUrlHelper::createByParams($action->urlData)
                ->enableEmptyLayout()
                ->enableNoActions()
                ->params
            ;
        };

        return $action->url;
    }
1309962
public function buildResource(?string $controller = null, ?string $action = null):?string
    {
        return $controller !== null ? $controller . ($action !== null ? self::RSEP . $action : '') : null;
    }
171753
public function RelativeLink($action = null)
    {
        $link = Controller::join_links(
            $this->ID,
            $action
        );
		
		$this->extend('updateRelativeLink', $link, $action);

        return $link;
	}
511579
public function RelativeLink($action = null)
    {
        return Controller::join_links(
            Director::baseURL(),
            $this->Link($action)
        );
    }