Getting started

How to configure Yiistrap for your project

Download the package and unzip its contents in your extensions folder. We highly recommend the use of Composer to manage your dependencies. If you have problems to install it, you can check the preconfigured project boilerplates, Yii-app or Yiinitializr.

Download

Fastest way to get started: get the extension and unzip its contents in your extensions folder and configure it.

Download Yiistrap

Clone

You can also clone the git repository by heading to the GitHub project page and following the instructions there.

Yiistrap on GitHub

Within the download you'll find the following file structure and contents, logically grouping assets, behaviors, components, helpers and widgets in respective directories.

Unzip the contents of the page under protected/extensions/bootstrap. The folder structure should now be the following:

  protected
  └── extensions
      └── bootstrap
          ├── assets
          │   ├── css
          │   ├── img
          │   ├── js
          │   └── less
          ├── behaviors
          ├── components
          ├── gii
          ├── helpers
          └── widgets

Open your application configuration in protected/config/main.php and modify it according to the following example:

<?php
// main configuration
return array(
	...
    // path aliases
    'aliases' => array(
        ...
        'bootstrap' => realpath(__DIR__ . '/../extensions/bootstrap'), // change this if necessary
    ),
    // import paths
    'import' => array(
        ...
        'bootstrap.helpers.TbHtml',
    ),
    // application modules
    'modules' => array(
        ...
        'gii' => array(
            'generatorPaths' => array('bootstrap.gii'),
        ),
    ),
    // application components
    'components' => array(
        ...
        'bootstrap' => array(
            'class' => 'bootstrap.components.TbApi',   
        ),
    ),
);

Add the following line to your main layout in protected/views/layouts/main.php to register the necessary CSS and JavaScript files:

<?php Yii::app()->bootstrap->register(); ?>

Coming soon!

Coming soon!

Head to the docs for examples or take a look at the API.

Visit the Yiistrap docs Open the Yiistrap API