libs/override/web/NpView.php
public function addBaseUrlScript()
    {
        // Add base Url and absolute base Url to the head
        $arrJsPosHEad = empty($this->js[static::POS_HEAD]) ? [] : $this->js[static::POS_HEAD];
        array_unshift($arrJsPosHEad,
            "var absoluteBaseUrl = \"" . Yii::$app->urlManager->createAbsoluteUrl('site/index') . "\";");
        array_unshift($arrJsPosHEad, "var baseUrl = \"" . Yii::$app->urlManager->baseUrl . "\";");
        $this->js[static::POS_HEAD] = $arrJsPosHEad;
    }
public function addBaseUrlScript()
    {
        // Add base Url and absolute base Url to the head
        $arrJsPosHEad = empty($this->js[static::POS_HEAD]) ? [] : $this->js[static::POS_HEAD];
        array_unshift($arrJsPosHEad,
            "var absoluteBaseUrl = \"" . Yii::$app->urlManager->createAbsoluteUrl('site/index') . "\";");
        array_unshift($arrJsPosHEad, "var baseUrl = \"" . Yii::$app->urlManager->baseUrl . "\";");
        $this->js[static::POS_HEAD] = $arrJsPosHEad;
    }
public function addBaseUrlScript ( ) { // Add base Url and absolute base Url to the head $ arrJsPosHEad = empty ( $ this -> js [ static :: POS_HEAD ] ) ? [ ] : $ this -> js [ static :: POS_HEAD ] ; array_unshift ( $ arrJsPosHEad , "var absoluteBaseUrl = \"" . Yii :: $ app -> urlManager -> createAbsoluteUrl ( 'site/index' ) . "\";" ) ; array_unshift ( $ arrJsPosHEad , "var baseUrl = \"" . Yii :: $ app -> urlManager -> baseUrl . "\";" ) ; $ this -> js [ static :: POS_HEAD ] = $ arrJsPosHEad ; }
Put javascript for base url to head
Put javascript for base url to head