Wiki

Sorted by viewsX
Displaying 421-430 of 727 result(s).

caching controllers with filters()

Created 3 years ago by RusAlexHow-tos1 comment – viewed 10,274 times – ( +2 ) – 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

Insert a multirow header in CGridView

Created about a year ago by PeppeHow-tos2 comments – viewed 10,261 times – ( +6 ) – version 1.1
The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way you can write columns grouping headers, and obtain a nicer view.

ChromePHP for Yii

Created 4 years ago by imeheszTips0 comments – viewed 10,144 times – ( +3 / -2 ) – version 1.1
ChromePHP is a console logging extension for Google Chrome.

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created 2 years ago by Xgamer99Tips3 comments – viewed 10,122 times – ( +1 ) – version 1.1
I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it or on the 'select all' checkbox.

Encapsulate db and module configurations

Created 5 years ago by ricardogranaTutorials3 comments – viewed 10,081 times – ( +7 ) – version 1.1
This method was inspirated on the excellent text about different environments available at http://www.yiiframework.com/doc/cookbook/32/
tags: module

CSqlDataProvider in CGridView

Created 10 months ago by Kostas Apazidis (KonApaz)Tutorials8 comments – viewed 10,076 times – ( +7 ) – version 1.1
In this wiki I will show how could use a CSqlDataProvider in CGridView with specific features

Adding a link to a CDataColumn

Created about a year ago by le_topTips6 comments – viewed 10,065 times – ( +3 ) – version 1.1
Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

Yii code completion and calltips in Komodo Edit

Created 4 years ago by viterTips1 comment – viewed 9,994 times – ( +6 ) – version 1.1
My favourite editor is Komodo Edit (free and crossplatform) and I use it for my everyday coding work. Just recently I found out how to make it help me to work with Yii. :) So follow these steps:
tags: Komodo Edit

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

Created about a year ago by thyseusTips4 comments – viewed 9,889 times – ( +11 )
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:

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

Created 2 years ago by c@cbaHow-tos3 comments – viewed 9,824 times – ( +9 ) – 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.