Wiki

Sorted by viewsX
Displaying 361-370 of 774 result(s).

CSqlDataProvider in CGridView

Created 2 years ago by Kostas Apazidis (KonApaz)Tutorials8 comments – viewed 19,587 times – ( +8 ) – version 1.1
In this wiki I will show how could use a CSqlDataProvider in CGridView with specific features

Using cache in CActiveDataProvider

Created 4 years ago by StammTips7 comments – viewed 19,463 times – ( +21 ) – version 1.1
First param in CActiveDataProvider could be a string with model name or instance of class. So, you may use CActiveRecord::cache() for cache, but you need set third param to 2, because you should cache 2 queries: counting and get data.

Multilanguage and SEO friendly

Created 2 years ago by InterboyHow-tos1 comment – viewed 19,451 times – ( +5 ) – version 1.1
In your application configuration (protected/config/main.php), set the sourceLanguage parameter to English:

multiple CActiveDataProviders in one CGridView

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos7 comments – viewed 19,404 times – ( +8 / -1 ) – version 1.1
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

Debugging CActiveRecord failed save() attempts

Created 3 years ago by BoazTips0 comments – viewed 19,375 times – ( +5 ) – version 1.1
When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.

Load the Yii-Bootstrap Extension on Specific Actions

Created 3 years ago by chuntleyHow-tos5 comments – viewed 19,372 times – ( +10 ) – version 1.1
A big problem I've hit with the Yii-Bootstrap extension is that all AJAX requests are initializing Bootstrap because of preload. This is a huge waste of resources, especially when using AJAX-based file uploaders that split the file into chunks. Large file uploads using that method could be initializing bootstrap hundreds of times.
tags: bootstrap, filter

pass variables or content block from view file to layout file

Created 3 years ago by yiqing95How-tos0 comments – viewed 19,126 times – ( +2 ) – version 1.1
If you use yiic to generate webApplication there will be a layout folder under the protected/views/, and the Controller class under protected/components which will use by default these layouts files.

How to use Smarty renderer in Yii

Created 5 years ago by dongbetaHow-tos2 comments – viewed 18,947 times – ( +4 ) – version 1.1
At first, create a class named SmartyRenderer under application/components or any directory you want.
tags: smarty, renderer

Rendering Views and Updating them with Ajax

Created 2 years ago by Manish GuptaTips4 comments – viewed 18,944 times – ( +2 )
I wanted to implement a widget that could refresh itself through Ajax without refreshing the whole page. CGridView and CListView are excellent examples of such widgets.

Multi level dropdown menu in Bootstrap

Created 2 years ago by sefburhanTutorials1 comment – viewed 18,785 times – ( +38 ) – version 1.1
To get multi level dropdown menu of using boostrap extension (http://www.yiiframework.com/extension/bootstrap/) widget TbNavbar just follow steps