Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 11-20 of 354 result(s).

Displaying, Sorting and Filtering Model Relations on a GridView

Created 2 years ago by Antonio RamirezHow-tos12 comments – viewed 111,599 times – ( +41 / -1 ) – version 2.0
One of the things you will find tricky to implement is the the sorting and filtering of a GridView's column that displays related model data.

Accessing data in a join table with the related models

Created 5 years ago by fsbHow-tos8 comments – viewed 104,330 times – ( +28 / -1 ) – version 1.1
Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.

Multiple-database support in Yii

Created 5 years ago by Steve FriedlHow-tos18 comments – viewed 101,650 times – ( +29 ) – version 1.1
The customary configuration of a Yii application includes just a single database section in the protected/config/main.php file, but it's easy to extend this to support more than one, tying each Model to one of the databases.
tags: Database

Uploading multiple images with CMultiFileUpload

Created 5 years ago by rsinghHow-tos16 comments – viewed 99,828 times – ( +38 ) – version 1.1
"The documentation for CMultiFileUpload isn't clear!"

Setting and getting systemwide static parameters

Created 5 years ago by Steve FriedlHow-tos3 comments – viewed 98,159 times – ( +12 ) – version 1.1
Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.
tags: config

How to use PHPExcel external library with Yii

Created 6 years ago by Antonio RamirezHow-tos14 comments – viewed 93,997 times – ( +30 / -1 ) – version 1.1
Trying to learn and help some other programmers to find their solutions on the Yii Forum (I think is a superb way to learn the framework), I was facing one challenge with an external library that a fellow programmer wanted to use -quite good indeed: PHPExcel. And what is PHPExcel?

Render Form in popup via AJAX (Create and Update) with ajax validation & Also load any page via ajax Yii 2.0 (2.3)

Created about a year ago by skwordenHow-tos9 comments – viewed 92,551 times – ( +26 ) – version 2.0
There are a few issues with the other solutions I originally used that I found from other wikis. I address the issues I had in this much simpler and shorter way. I am also going to explain what is going into way more detail than others to help people understand what's going on.

Date Picker by examples

Created 3 years ago by InterboyHow-tos6 comments – viewed 90,675 times – ( +10 / -2 ) – version 1.1
CJuiDatePicker displays a datepicker. CJuiDatePicker encapsulates the JUI datepicker plugin.

How to set up Unicode

Created 7 years ago by MikeHow-tos10 comments – viewed 90,492 times – ( +19 ) – version 1.1
To fix issues with display of special language characters once and for all there's a solution: use Unicode UTF-8 everywhere. If everything is set up to use Unicode, you can use mostly every language in your application.
tags: i18n, unicode

Save and Display Date/Time Fields in different formats in Yii2

Created 2 years ago by Kartik VHow-tos12 comments – viewed 88,986 times – ( +39 ) – version 2.0
You would find having such a need in most Yii Projects. Your database needs a specific format to store date fields, while you may want to display it in different formats to the users on forms and other views.