public function getPageLink($navId, $target, $lang = null)
    {
        $linkQuery = Yii::$app->menu->find();
        $linkQuery->where(['nav_id' => $navId]);
        $linkQuery->with(['hidden']);
        if ($lang) {
            $linkQuery->lang($lang);
        }
        $link = $linkQuery->one();
        
        // if a page is found, set the target value from the config.
        if ($link) {
            $link->setTarget($target);
        }
        
        return $link;
    }