Wiki

Sorted by ratingX
Displaying 341-350 of 467 result(s).

An important tip when you are using CArrayDataProvider.

Created 8 months ago by sirin kTips0 comments – viewed 3,642 times – ( +5 / -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”.

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 8 months ago by BoazHow-tos2 comments – viewed 3,213 times – ( +5 / -1 )
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

How to write a simple application component

Created 2 years ago by zaccariaHow-tos4 comments – viewed 19,906 times – ( +12 / -7 )
An application component is a confortable way for share information among all component of the application

Exporting CGridView results to CSV file

Created about a year ago by RusAlexTutorials8 comments – viewed 15,526 times – ( +6 / -2 )
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

Saving files to a blob field in the database

Created 2 years ago by zaccariaTips7 comments – viewed 26,218 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

Ajax form submiting in Yii

Created 8 months ago by sirin kTutorials6 comments – viewed 26,715 times – ( +6 / -2 )
hi guys, Here I'm going to give you a working example of ajax form submiting in Yii.

Using CAutoComplete to display one value and submit another

Created 4 years ago by luoshibenTutorials5 comments – viewed 32,808 times – ( +7 / -3 )
Note: CAutoComplete is deprecated since Yii 1.1.3. Consider using CJuiAutoComplete.

Putting Function To Be Called In View

Created 2 years ago by junxiongTips2 comments – viewed 13,880 times – ( +4 / -1 )
Sometimes we need some complicated view to be displayed (such as generating complicated table). Most people suggest that in MVC the View must be as simple as possible (don't have too much loops, etc). So what we have to do is to hide away the complex code by putting it at somewhere else. The following are few places options to keep the function:
tags: view, render

Install, update and use Yii with WAMP server

Created 6 months ago by mrsHow-tos4 comments – viewed 8,507 times – ( +4 / -1 )
Here I am describing how you can install and update Yii in WAMP sever.

Create sitemap.xml file dynamically on root folder with one hit

Created 6 months ago by kiran sharmaHow-tos1 comment – viewed 3,887 times – ( +4 / -1 )
I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
tags: SEO, SiteMap, XML