Wiki

Articles in category "tips"X
Displaying 41-50 of 97 result(s).

1:n relations sometimes require CDbCriteria.together

Created about a year ago by fsbTips4 comments – viewed 13,705 times – ( +13 )
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

CGridView: Render customized/complex datacolumns

Created about a year ago by JobloTips7 comments – viewed 56,967 times – ( +55 )
If you have to display a overview of related data in a table, you can use the CListView, create your view with table/tr/td tags and implement db-queries in the view to display detaildata of the current (master-)record.
tags: CGridView

Yii Security-extended guide

Created about a year ago by bingjie2680Tips11 comments – viewed 9,731 times – ( +6 / -6 )
This article is called extended guide is because there is already a security guide in the Yii tutorial security section. but that guide is not complete in the sense that it does not rise the developers' attention to some other commonly happening attacks: SQL injection and magic URL, which can be major vulnerabilities in your application without much caring.

Understanding series articles

Created about a year ago by GOshaTips0 comments – viewed 6,207 times – ( +16 )
Here are all wiki articles from "Understanding" series by Yii wiki contributors:

CGridView: Update/create records in a CJuiDialog

Created about a year ago by JobloTips10 comments – viewed 20,955 times – ( +11 )
My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

CGridView: Display the full record (actionView) in a CJuiDialog

Created about a year ago by JobloTips7 comments – viewed 21,507 times – ( +13 )
If you show a model (with a lot of attributes) partially in a CGridView, it can be helpful when the user can take a quick look at the full record with all attributes without displaying the view as a page and afterwards returning back to the gridview.

Using events with CAction classes

Created about a year ago by Antonio RamirezTips0 comments – viewed 7,510 times – ( +8 )
There are some good guides out there explaining how to work with events and the ways to attach them to your components, but none (that I know) explain the following way to configure your events with CAction classes on your controllers the following way.

Como trasponer una lista creada con CHtml::checkBoxList

Created about a year ago by rdjteamTips3 comments – viewed 4,962 times – ( +2 )
En ciertas ocasiones tenemos que lidiar con el tema de colocar una lista de checkboxes para hacer una seleccion especifica como es el caso de los dias de la semana para un calendario, para esta labor tenemos el comando CHtml::checkBoxList(), revisando un poco el funcionamiento de este temos los siguientes parametros:

Special $variables in CGridView and CListView

Created about a year ago by Steve FriedlTips8 comments – viewed 21,727 times – ( +18 / -1 )
The popular CListView and CGridView widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data variable to represent the current model object or array.

how to use github (un)official extension repo in your Yii project

Created about a year ago by RusAlexTips4 comments – viewed 5,275 times – ( +4 )
Using a git submodule command in your yii project