Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 161-170 of 341 result(s).

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Created about a year ago by Kartik VHow-tos2 comments – viewed 14,150 times – ( +37 / -4 ) – version 2.0
In Yii 2.0, the yii widgets that use Twitter Bootstrap CSS & JS directly, are part of the yii2-bootstrap extension, starting with yii/bootstrap namespace. For customizing bootstrap extension specific widget assets, you could configure your own assets (CSS/JS) using the new Yii Asset Manager in your Yii Config file. Something like:

Changing Controllers Name

Created 4 years ago by TrejderHow-tos0 comments – viewed 13,833 times – ( +5 ) – version 1.1
This very short how-to presents steps required to change controller name. It is oriented for less experienced users, which are starting their journey with Yii, to avoid common newbie pitfalls.

CSV Export

Created 3 years ago by JohnPollardHow-tos5 comments – viewed 13,629 times – ( +4 ) – version 1.1
I needed a csv export function for my cgridview and I wanted to export the entire result set of the sorted and filtered cgridview the user was viewing via ajax.
tags: csv, export

Create a custom menu using CMenu data-items (flat or tree structure)

Created about a year ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 13,607 times – ( +4 )
There are cases that you want more control to your menu Suppose you want a specific menu with complex css, layout, images. also you want to add extra content,html,css,javascript etc it run time foreach submenu item by conditions.

Sub-domains with different databases in Yii!

Created 4 years ago by jwerdHow-tos4 comments – viewed 13,591 times – ( +2 ) – version 1.1
Sub-domains with different databases in Yii!

"safe" and "unsafe" Model validators (massive assignments)

Created about a year ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 13,447 times – ( +4 / -6 )
Ok, it is a little bit difficult to full understanding the unsafe validator.

Generate a multi-lever array sub-category for a menu

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos8 comments – viewed 13,434 times – ( +10 ) – version 1.1
Everyone have seen a multilayer menu in several CMS

Using Grunt for deploying client scripts

Created 2 years ago by Chris83How-tos8 comments – viewed 13,427 times – ( +11 ) – version 1.1
For a long time I have struggled to find a suitable tool for doing server tasks such as compiling LESS files, concatenating and minifying of JavaScript files and copying the minified JavaScript files. While most of these tasks can be done with Yii extensions I would still not recommend using them because it requires you to include these extensions in your project, and therefore also deploying them in your production environment.

Extending an ActiveRecord model

Created 2 years ago by BogseyHow-tos3 comments – viewed 13,393 times – ( +2 / -3 ) – version 1.1
Introduction