Articles in category "how-tos", sorted by viewsX
Displaying 151-160 of 346 result(s).

pass variables or content block from view file to layout file

Created 2 years ago by yiqing95How-tos0 comments – viewed 16,794 times – ( +2 ) – version 1.1
If you use yiic to generate webApplication there will be a layout folder under the protected/views/, and the Controller class under protected/components which will use by default these layouts files.

multiple CActiveDataProviders in one CGridView

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos6 comments – viewed 16,372 times – ( +7 / -1 ) – version 1.1
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

Popup AJAX DialogBox without any extension

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos6 comments – viewed 16,311 times – ( +8 / -1 )
In this wiki I explain how to show a default popup dialogbox (like Gii does) using an existing module.

A Multi-Tenant Strategy using Yii and MySQL

Created about a year ago by JFReyesHow-tos8 comments – viewed 16,045 times – ( +9 ) – version 1.1
This article describes an implementation of multi-tenancy using Yii and MySQL.

Cheat Sheet: Displaying Name instead of Numbers and Displaying Alphanumeric instead of numeric values

Created 2 years ago by skwordenHow-tos4 comments – viewed 16,031 times – ( +4 / -1 ) – version 1.1
I keep a reference to some simple but painful task if you forget a common or something. I am new to Yii and this took awhile for me to figure out. Everything I read said do this or do that and not a single one worked for me. However, the following did.

i18n All-in-one format and timezone conversions for date, time, timestamp and datetime.

Created 2 years ago by Gerhard LiebenbergHow-tos3 comments – viewed 15,927 times – ( +7 / -1 ) – version 1.1
Countries sometimes change their laws pertaining to timezones and daylight saving times. This means that GMT+2 can be a different time this August compared to last August! However, by using php's DateTime class (instead of timestamps), we can do both "format" and "timezone" conversions on a single DateTime object (only 2 lines of code) for date, time, timestamp and datetime types - while php takes care of nightmares such as current and historical timezones and daylight saving times.

Radio Button List with enum values for column of type ENUM >+> incorporate into giix

Created 3 years ago by pckabeerHow-tos1 comment – viewed 15,880 times – ( +7 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a Radio Button List, which has the enum values as options. This is a rewrite of c@cba in the wiki article of enumDropdownListThe main code was contributed by zaccaria in the forum (see this post).

Twitter Bootstrap style Breadcrumbs

Created 2 years ago by junaidatariHow-tos0 comments – viewed 15,860 times – ( +5 / -1 ) – version 1.1
1: Create breadcrumb in your view file.


Created 3 years ago by zeroByteHow-tos0 comments – viewed 15,616 times – version 1.1
This HowTo assumes that you have a smattering of ACL in general and of how the acl-extension works basically. It will introduce you into the abstract and give you a hint on how to use Business-Rules. If you have in-depth questions, please refer to the extension documentation. Using ACL in an RBAC-manner cannot and should never obscure the fact that the underlying system is still ACL-based. In fact, the Business-Rules are just another layer in the permission-check plan.