Wiki

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

CGridView: Render customized/complex datacolumns

Created about a year ago by JobloTips7 comments – viewed 56,984 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

Configuring PhpStorm IDE for Yii

Created 2 years ago by samdarkTips13 comments – viewed 41,724 times – ( +50 / -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 about a year ago by Steve FriedlTips13 comments – viewed 35,055 times – ( +123 )
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.

Ajax update

Created 2 years ago by zaccariaTips1 comment – viewed 32,901 times – ( +20 / -2 )
Often happens to have the need of change a part of the page with ajax.
tags: AJAX

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

Created 10 months ago by kiran sharmaTips9 comments – viewed 29,923 times – ( +19 )
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)

Saving files to a blob field in the database

Created 2 years ago by zaccariaTips7 comments – viewed 26,215 times – ( +6 / -2 )
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

htmlOptions explained for various controls.

Created 2 years ago by WoilTips1 comment – viewed 24,364 times – ( +16 )
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:

Adding Yii Search to Your Browser Search Box

Created 2 years ago by qiangTips1 comment – viewed 21,885 times – ( +26 )
The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.
tags: search

Styling Radio Buttons

Created 2 years ago by Steve FriedlTips2 comments – viewed 21,731 times – ( +10 )
The default behavior with radio button lists is ugly, and I figured out mostly how to style them a coupla different ways. I'll used the blog tutorial example (but with my own posting modes):

Special $variables in CGridView and CListView

Created about a year ago by Steve FriedlTips8 comments – viewed 21,731 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.