Wiki

Sorted by viewsX
Displaying 141-150 of 470 result(s).

How to filter data using a dropdown list?

Created 4 years ago by qiangTutorials0 comments – viewed 17,393 times – ( +6 )
A dropdown list can be used to select a value, based on which we can filter the data to be displayed. For example, the extension page has a dropdown list to filter the displayed extensions according to the selected category.

Actions code reuse with CAction

Created 2 years ago by Antonio RamirezHow-tos13 comments – viewed 17,381 times – ( +30 )
We all know how good 'gii' automates the code for us and we normally tend to be happy with what that tool offers at the beginning of our Yii learning curve. But as soon as you start working in larger and larger projects, you realize that its code is too repetitive to maintain and having a small pitfall in general actions means to go over and over through them to fix the issues.
tags: CAction, Tutorial

The complete beginner's study guide for the Yii Framework

Created 7 months ago by Rodrigo CoelhoTips2 comments – viewed 17,219 times – ( +18 )
Start studying the MVC pattern. You will understand the roles of the model, the view and the controller and know where goes each part of the code.

Creating a jQueryUI Sortable CGridView

Created about a year ago by blindMoeHow-tos13 comments – viewed 17,058 times – ( +35 )
I have had to do this a couple of times now so I figured I would share it with the community. I am going to keep this short because I really hope that you are familiar with jQueryUI's Sortable class before starting this tutorial.

Secure password hash storage and a Yii helper extension

Created about a year ago by fsbTutorials5 comments – viewed 16,918 times – ( +14 )
This article was rewritten as the README of the Randomness GitHub repo

Setting application parameters dynamically in the back-end

Created about a year ago by PablovpTutorials4 comments – viewed 16,806 times – ( +10 / -1 )
I was wondering how to set-up the application parameters in the back-end to use them all around the application without the need of using the database and I came up with this solution, I hope it helps somebody else.

To configure Yii path in Windows platform

Created 2 years ago by CodaTutorials2 comments – viewed 16,688 times – ( +1 / -6 )
I can see many questions regarding configuring the path using Windows OS. I could hardly get the right information about it. The cook book has defined for Linux. So I would like to share my idea on it. To configure the Yii path using Windows OS,

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

Created 8 months ago by yJeroenTutorials8 comments – viewed 16,480 times – ( +11 )
This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created about a year ago by c@cbaTutorials0 comments – viewed 16,254 times – ( +20 / -1 )
    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this: 'value'=>'$data->author->username',.     Now we might want to use $data in the declaration of the htmlOptions attribute, which is normally not possible, to generate for example the tag <td id="3" class="name_3">, where 3 is the id of the data model for the current row, i.e. $data->id. That is, we want to be able to use: 'htmlOptions'=>array('id'=>'$data->id', 'class'=>'"name_{$data->id}"')     Here's a way to accomplish this...

Searching and Sorting by Count of Related Items in CGridView

Created about a year ago by softarkHow-tos10 comments – viewed 16,200 times – ( +21 )
Let's say we have two models and relation between them: