Wiki

Displaying 421-430 of 719 result(s).

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

Created 2 years ago by c@cbaTutorials3 comments – viewed 41,748 times – ( +28 / -1 ) – version 1.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...

Using Yii with PHP 5.4 built-in webserver instead of Apache

Created 2 years ago by samdarkHow-tos1 comment – viewed 9,671 times – ( +21 ) – version 1.1
Since version 5.4 PHP can work as a simple webserver so you can develop Yii applications without installing Apache. That's how to use it:

Getting the Most out of APC for Yii

Created 2 years ago by Da:SourcererHow-tos10 comments – viewed 27,824 times – ( +16 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

AssetManager: clearing browser's cache on site update

Created 2 years ago by dhampikHow-tos4 comments – viewed 24,076 times – ( +18 ) – version 1.1
If you like the things to be short and clear, then you can skip right to a short summary of instructions at the end of this article.

Simple Share Widget for Facebook, twitter and google+

Created 2 years ago by softarkHow-tos4 comments – viewed 15,701 times – ( +10 ) – version 1.1
This widget will show a Facebook "like" button and "comments" box together with "tweet" button and "google plusone" button on your page.

CGridView keep focus on the control after filtering

Created 2 years ago by jayalaHow-tos2 comments – viewed 7,964 times – ( +6 ) – version 1.1
You can find the reason why I wrote this article here.
tags: CGridView, filter

Collaborative software with git

Created 2 years ago by sensorarioTutorials0 comments – viewed 5,865 times – ( +9 ) – version 1.1
The most difficult thing in a big project, is to manage conflicts with files modified by others users. Git can do this work for us.

Starting your Yii Project Reference Guide (with Git VCS in Linux)

Created 2 years ago by marcanuyTutorials5 comments – viewed 24,441 times – ( +18 ) – version 1.1
I've found useful to have a step by step reference guide to work with Git with most used commands, feel free to update it with useful information you may find interesting too.

Exporting CGridView results to CSV file

Created 2 years ago by RusAlexTutorials9 comments – viewed 31,722 times – ( +6 / -3 ) – version 1.1
A few days ago, i worked for CGridView exporting functional for my client. He asked me to create a simple exporting to a CSV file a CGridView search results.
tags: cgridview, export, csv

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,663 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.