lan143/yii2-advanced-view

The extension adds the ability to post styles anywhere in the body

This package's canonical repository appears to be gone and the package has been frozen as a result.

Installs: 2 630

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

0.1.0 2017-02-27 08:01 UTC

This package is not auto-updated.

Last update: 2023-05-03 13:27:43 UTC


README

The extension adds the ability to post styles anywhere in the body.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist lan143/yii2-advanced-view "*"

or add

"lan143/yii2-advanced-view": "*"

to the require section of your composer.json file.

Update config file config/web.php

return [
    'components' => [
        'view' => [
            'class' => 'lan143\advanced_view\View',
        ],
    ],
]

Usage

assets/AppAsset.php

class BlogAsset extends AssetBundle
{
    public $css = [
        'css/site.css'
    ];

    public $js = [
        'js/site.js'
    ];

    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
    ];

    public $cssOptions = [
        'position' => \yii\web\View::POS_END
    ];
}

or config/web.php

$config = [
    'components' => [
        'assetManager' => [
            'bundles' => [
                'yii\bootstrap\BootstrapAsset' => [
                    'cssOptions' => [
                        'position' => \yii\web\View::POS_END
                    ],
                ],
            ],
        ],
    ],
];