HTML Block Module For Yee CMS

0.1.0 2017-03-01 11:26 UTC

This package is auto-updated.

Last update: 2022-03-29 00:28:25 UTC


##Yee CMS - HTML Block Module

####Backend module for managing blocks

This module is part of Yee CMS (based on Yii2 Framework).

Block module lets you easily create HTML blocks on your site.


  • Either run
composer require --prefer-dist yeesoft/yii2-yee-block "~0.1.0"

or add

"yeesoft/yii2-yee-block": "~0.1.0"

to the require section of your composer.json file.

  • Run migrations
yii migrate --migrationPath=@vendor/yeesoft/yii2-yee-block/migrations/


  • In your backend config file
	'block' => [
		'class' => 'yeesoft\block\BlockModule',


  • Widget namespace:
use yeesoft\block\models\Block;
  • Render HTML Block by slug:
echo Block::getHtml('block-slug'); 
  • You can use variables in your HTML Blocks. Example:

    example of block with variables:

<div class="some-class">
    <a href="{{link}}">{{title}}</a>

render block with variables:

echo Block::getHtml('block-slug', ['link' => '', 'title' => 'Example Site']);