README.md 1.46 KB
Newer Older
Marcello Pivanti's avatar
Marcello Pivanti committed
1
2
3
4
5
6
7
8
9
10
11
12
13
Amos Basic Layout
-----------------------

Templates, layouts and styles for amos basic installation

Installation
------------

1. The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
    
    Either run
    
    ```bash
Aster's avatar
Aster committed
14
    composer require arter/amos-layout
Marcello Pivanti's avatar
Marcello Pivanti committed
15
16
17
18
19
    ```
    
    or add
    
    ```
Aster's avatar
Aster committed
20
    "arter/amos-layout": "~1.0"
Marcello Pivanti's avatar
Marcello Pivanti committed
21
22
23
24
25
26
27
28
29
30
31
    ```
    
    to the require section of your `composer.json` file.
    
2.  Add module to your main config in common:
        
    ```php
    <?php
    $config = [
        'modules' => [
            'layout' => [
Aster's avatar
Aster committed
32
                'class' => 'arter\amos\layout\Module',
Marcello Pivanti's avatar
Marcello Pivanti committed
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
                'advancedLogoutActions' => true, // [OPTIONAL] if you want to display
                // two different logout buttons (one that redirects to login page and one that
                // redirects to main frontend page set in (common) params['platform']['frontendUrl'])
            ],
        ],
    ];
    ```
    
3. Add Bootstrap
        
    ```php
    <?php
    $config = [
       'bootstrap' => ['layout']
    ];
    ```

Tools
-----

Get base asset, required for all other assets, this mades easier to use a custom amosLayout instance 
```php
<?php

class MyCustomAppAsset extends AssetBundle
{
    public $depends = [];

    public function init()
    {
        $this->depends[] = \Yii::$app->layout->baseAssetClass;

        parent::init();
    }
}
```

PARAMS
-----
search navbar menu
```php
'searchNavbar' => true
```