We are going to deploy the new yiiframework.com website on March 23, 2018 from 8:00 to 12:00 UTC.
Website and Yii documentation will not be available in this time frame. Check the news for more details.


Sorted by viewsX
Displaying 531-540 of 786 result(s).

An important tip when you are using CArrayDataProvider.

Created 5 years ago by sirin kTips0 comments – viewed 13,832 times – ( +8 / -2 ) – version 1.1
Yii's CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an error like “yourmodel.id is not defined”.

CGridView customized CCheckBoxColumn

Created 4 years ago by chandranTips2 comments – viewed 13,827 times – ( +5 / -1 ) – version 1.1
Hi friends,

Como trasponer una lista creada con CHtml::checkBoxList

Created 6 years ago by rdjteamTips3 comments – viewed 13,748 times – ( +2 / -1 ) – version 1.1
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:

How to customize error handling in console-mode applications

Created 7 years ago by Steve FriedlHow-tos1 comment – viewed 13,736 times – ( +3 / -1 ) – version 1.1
One can control the detail of a web application in the webroot/index.php file by manipulating the values of YII_DEBUG and YII_TRACE_LEVEL, but these don't appear to be used by console applications. This is because although the base CApplication class defines a displayError() method that does consider these variable, CConsoleApplication overrides it with a function that doesn't honor them.

caching controllers with filters()

Created 6 years ago by RusAlexHow-tos1 comment – viewed 13,711 times – ( +2 / -1 ) – version 1.1
Hello, this article will describe some aspects about caching controllers with filters() method in your controller. And I will describe some problems I meet when using this approach for caching, the main problem was

How to catch and log MySQL deadlock errors

Created 5 years ago by sebTips1 comment – viewed 13,656 times – ( +4 / -1 ) – version 1.1
This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.
tags: database

Using CListView to display items next to each other (in columns)

Created 4 years ago by thyseusTips4 comments – viewed 13,652 times – ( +11 / -1 )
When using CListView to display multiple views next to each other, we can use the $index variable inside the viewFile to achieve this. As far as i know there is no extension or out-of-the-box functionality for this, so we need to apply a little hack:

Display image on CGridView column and open a fancy-box

Created 4 years ago by Ankit ModiTutorials0 comments – viewed 13,631 times – ( +1 / -2 )
1) Add a fancy-box extension on admin page

Create/Develop View files with plain HTML (Without using ActiveForm Class)

Created 4 years ago by kalpitHow-tos2 comments – viewed 13,560 times – ( +2 / -3 ) – version 1.1
Today i want to share with you is "How can we write HTML Code in view files? I am writing this article because many times we can not use CActiveForm to design our form...
tags: views, tutorial

How to extend CFormatter, add i18n support to booleanFormat and use it in CDetailView

Created 6 years ago by c@cbaHow-tos3 comments – viewed 13,546 times – ( +9 / -1 ) – version 1.1
As you know, the CDetailView widget displays details of a single model. If no formatting is specified, boolean values that are stored in the database as 0 and 1, are represented in the detail view as 0 and 1. If formatted as boolean, they are represented as 'No' and 'Yes'. We want to add i18n support, so that Yes and No appear in the current language.