Wiki

Articles in category "tips", sorted by viewsX
Displaying 1-10 of 141 result(s).

CGridView: Render customized/complex datacolumns

Created 2 years ago by JobloTips13 comments – viewed 116,092 times – ( +73 ) – version 1.1
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

How to upload image(photo), and path entry in database with update functionality

Created 2 years ago by kiran sharmaTips17 comments – viewed 100,510 times – ( +35 / -3 ) – version 1.1
I saw many posts that community newbie is confuse in image/photo upload with random name. so I post this topic covering all useful things regarding to image/photo upload(not covering image attribute related functionality)

Configuring PhpStorm IDE for Yii

Created 4 years ago by samdarkTips20 comments – viewed 79,600 times – ( +65 / -1 ) – version 1.1
In order to be able to get from render or renderPartial to the view, from widget to widget class, from relations to model classes you need to install additional plugin called YiiStorm.
tags: IDE, PhpStorm

Guidelines for good schema design

Created 3 years ago by Steve FriedlTips15 comments – viewed 59,415 times – ( +141 ) – version 1.1
Virtually all Yii applications are built on top of a database, and though Yii is very flexible in how it addresses your DB, some design choices make things more convenient than others.

An Easy Solution for Dependent dropDownList Using AJAX

Created about a year ago by mrsTips10 comments – viewed 52,307 times – ( +11 / -1 ) – version 1.1
Sometimes new Yii guys face problem to manage dependent dropDownList using AJAX. I am going to discuss an easy solution about this issue.

The complete beginner's study guide for the Yii Framework

Created 2 years ago by Rodrigo CoelhoTips2 comments – viewed 49,199 times – ( +20 ) – version 1.1
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.

Special $variables in CGridView and CListView

Created 3 years ago by Steve FriedlTips11 comments – viewed 44,944 times – ( +26 / -1 ) – version 1.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.

htmlOptions explained for various controls.

Created 3 years ago by WoilTips1 comment – viewed 43,234 times – ( +17 ) – version 1.1
Most controls that are rendered by CHtml have an argument called $htmlOptions. This argument is an array that holds the attributes of the HTML element. For example the following code:

Saving files to a blob field in the database

Created 4 years ago by zaccariaTips8 comments – viewed 42,345 times – ( +9 / -2 ) – version 1.1
As a follow-up from the How to upload a file using a model wiki entry that explains how to save a file to the filesystem, this article will do the same using a blob field in the database.
tags: File upload

Ajax update

Created 4 years ago by zaccariaTips2 comments – viewed 42,199 times – ( +21 / -2 ) – version 1.1
Often happens to have the need of change a part of the page with ajax.
tags: AJAX