How to configure Yiiwheels 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 at Yiinitializr.
Fastest way to get started: get the extension and unzip its contents in your extensions folder and configure it.
Looking for older version for Bootstrap 2+?
You can also clone the git repository by heading to the GitHub project page and following the instructions there.
important This version of yiiwheels, requires the use of Yiistrap. If you wish to use the 2amigOS! custom one, we removed that requirement and made use of namespaces.
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 package under protected/extensions/yiiwheels. The folder structure should now be the following:
protected └── extensions └── yiwheels ├── assets │ ├── css │ ├── img │ ├── js │ └── less ├── behaviors ├── 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( ... // yiistrap configuration 'bootstrap' => realpath(__DIR__ . '/../extensions/bootstrap'), // change if necessary // yiiwheels configuration 'yiiwheels' => realpath(__DIR__ . '/../extensions/yiiwheels'), // change if necessary ), // import paths - yiistrap configuration 'import' => array( 'bootstrap.helpers.TbHtml', ), // application components 'components' => array( ... // yiistrap configuration 'bootstrap' => array( 'class' => 'bootstrap.components.TbApi', ), // yiiwheels configuration 'yiiwheels' => array( 'class' => 'yiiwheels.YiiWheels', ), ), );
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(); ?>
Includes most of the widgets from YiiBooster (refactored) and the list will grow even more.
Head to the docs for examples or take a look at the API.