Yii2 dev digest #4 Dec'13 > stdout.in Ievgen Kuzminov IT blog

Yii2 dev digest #4 Dec'13

Dec 27, 2013, 1:28:31 PM

The last digest this year.
I wish all of us to dive deep in new exciting projects with Yii2 in the next year (as I am sure there will be a stable release relatively soon, according the progress ;))
Stay in touch with development process, grow your skills with it, grow faster then it !

Tips & Tricks

@cebe :

class RedactorI18NAsset extends AssetBundle
{
    public $sourcePath = '@app/assets/redactor';
    public $js = [
    ];

    public function init()
    {
        $this->js[] = 'jquery.ui.datepicker-' . Yii::$app->language . '.js';
        parent::init();
    }
}
<php $this->beginContent('@app/views/layouts/main.php'); ?>

<div class="row">
   <div class="col-md-3">
    <div class="pg-sidebar">          
      <?= $this->blocks['sidebar']; ?>

      <?= $this->blocks['toolbar']; ?>
    </div>      
  </div>
  <div class="col-md-9">
    <?= $content; ?>
  </div>
</div>
<php $this->endContent(); ?>

And in your controller, you set a new public variable: public $layout = "/main";
In your ControllerAction you can set layout by: $this->layout = "/column2";

Read previous digests

comments powered by Disqus
Ievgen
Kuzminov "iJackUA"
Web Team Lead
at MobiDev (Kharkiv, Ukraine)
Code in Ruby and Elixir, but still love PHP. Explore ES6 and Vue.js. Explore databases, use Ubuntu and MacOS, think about IT people and management

Notes


Did you know ? Vagrant (1.5+) "Error: Remote connection disconnect. Retrying..." while loading is not a bug. It just try to detect when VM is loaded. Yep... very confusing.



Slick - really looks like "the last JS carousel you'll ever need". Responsive, touch-enabled, mouse-dragging, dynamic add/remove.



Tried yii2-pjax widget on blog. A few moment of work and you can navigate through Notes without page reload. Really cool!