public static function linkUrl($pageId, $pageUrl)
    {
        if (self::$pages === null) {
            self::initPages();
        }

        if ($pageUrl) {
            if (strpos($pageUrl, 'http') === 0) {
                return Url::to($pageUrl);
            }

            return Url::to([$pageUrl]);
        }

        if (isset(self::$pages[$pageId]['link'])) {
            if (self::$pages[$pageId]['link']) {
                return Url::to(['/' . self::$pages[$pageId]['link']]);
            }
        }

        return Url::home();
    }