PHP code example of laker-ls / yii2-dynamic-page

1. Go to this page and download the library: Download laker-ls/yii2-dynamic-page library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

laker-ls / yii2-dynamic-page example snippets


'modules' => [
    'dynamic-page' => [
        'class' => 'lakerLS\dynamicPage\Module',
    ],
    'treemanager' =>  [ // модуль для работы с деревом категорий.
        'class' => '\kartik\tree\Module',
    ]
]

'urlManager' => [
    'enablePrettyUrl' => true,
    'showScriptName' => false,
    'rules' => [
        // Переопределение путей.
        ['class' => 'lakerLS\dynamicPage\components\DynamicPage'],
    ],
],

'components' => [
        'assetManager' => [
            'bundles' => [
                'yii\web\JqueryAsset' => [
                    'jsOptions' => ['position' => \yii\web\View::POS_BEGIN],
                    'js' => [
                        '//ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js', // Указать путь к вашему jQuery
                    ]
                ],
            ],
        ],

public $jsOptions = ['position' => \yii\web\View::POS_BEGIN];

return [
    'bsDependencyEnabled' => false,
];

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