PHPackages                             flyo/nitro-yii2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. flyo/nitro-yii2

ActiveYii2-extension[Framework](/categories/framework)

flyo/nitro-yii2
===============

Flyo Nitro Yii2 Framework Module

3.2(2mo ago)01.9kMITPHPPHP &gt;=8.3CI passing

Since Apr 30Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/flyocloud/nitro-yii2)[ Packagist](https://packagist.org/packages/flyo/nitro-yii2)[ RSS](/packages/flyo-nitro-yii2/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (19)Used By (0)

Flyo Nitro Yii2 Framework Module
================================

[](#flyo-nitro-yii2-framework-module)

[![PHPUnit](https://github.com/flyocloud/nitro-yii2/actions/workflows/phpunit.yml/badge.svg)](https://github.com/flyocloud/nitro-yii2/actions/workflows/phpunit.yml)

```
composer require flyo/nitro-yii2
```

add the module to your config

```
'modules' => [
    'flyo' => [
        'class' => \Flyo\Yii\Module::class,
        'token' => 'YOUR_TOKEN',
    ]
]
```

add the cms page resolve to your views in the folder `/views/nitro.php`, all the routes from flyo nitro will now be resolved into this view file:

```

```

In order to render those blocks use the `Flyo\Yii\Widgets\PageWidget` which will lookup all blocks inside the folder `/views/flyo/*`, so for instance you have a `HeroTeaser` component defined in flyo the view file is stored in `/views/flyo/HeroTeaser.php` with example content:

```
/** @var \Flyo\Model\Block $block */
print_r($block->getContent());
print_r($block->getConfig());
print_r($block->getItems());
print_r($block->getSlots());
```

Layout
------

[](#layout)

Generate a navigation in the layout file, use the `NavWidget`:

```
