Wiki

Sorted by ratingX
Displaying 101-110 of 766 result(s).

Display an AJAX tree from your DB using CTreeView

Created 5 years ago by François GannazTutorials10 comments – viewed 53,058 times – ( +21 ) – version 1.1
This example uses a MySQL DB with a table named tree with the fields id, name, and parent_id. The parent_id will be NULL for root elements. The SQL is kept simple (no autoinc, no FK, etc).
tags: AJAX, CTreeView

Reading the doc

Created 5 years ago by zaccariaTips0 comments – viewed 7,350 times – ( +21 ) – version 1.1
Almost all the information you need whilst working with yii is written in the Class Reference.
tags: doc

Dynamic Sidebar using CClipWidget

Created 5 years ago by SheldmanduHow-tos5 comments – viewed 25,540 times – ( +21 ) – version 1.1
Most applications will have one or two sidebars and often you want to control the content that should appear in the sidebar based on the action. For example you will want to show something different on the homepage as opposed to some view page. While achieving this you generally also want to avoid putting the layout into each view, as that would mean if you wanted to change the layout (e.g. put the sidebar on the left instead of the right or do some funky layout which requires an additional div tag to be added) you'd have to go through every view, which does not achieve good code re-use. It is also bad practice to have lots of if statements in column2 layout just so that you can generate the sidebar correctly.

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

Created 3 years ago by yJeroenTutorials8 comments – viewed 53,164 times – ( +21 ) – version 1.1
This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

The complete beginner's study guide for the Yii Framework

Created 3 years ago by Rodrigo CoelhoTips2 comments – viewed 68,074 times – ( +21 ) – 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.

Using cache in CActiveDataProvider

Created 4 years ago by StammTips7 comments – viewed 18,455 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.

AngularJS Frontend:Connecting it with a Yii Backend REST API.Gallery Manager Demo Application.

Created 2 years ago by drumaddictHow-tos15 comments – viewed 69,567 times – ( +21 ) – version 1.1
AngularJS Frontend:Connecting it with a Yii Backend REST API.Gallery Manager Demo Application.

Simple RBAC

Created 3 years ago by hasanaviTutorials17 comments – viewed 79,727 times – ( +49 / -3 ) – version 1.1
If you need simple Role based access control without the long RBAC process then this article is just for you. Lets jump to the point.

How to log changes of ActiveRecords?

Created 6 years ago by pfthTutorials7 comments – viewed 41,601 times – ( +40 / -2 ) – version 1.1
A simple and effective way to keep track what your users are doing within your application is to log their activities related to database modifications. You can log whenever a record was inserted, changed or deleted, and also when and by which user this was done. For a CActiveRecord Model you could use a behavior for this purpose. This way you will be able to add log functionality to ActiveRecords very easily.
tags: Logging

Clean JavaScript code in your views

Created 2 years ago by nineinchnickTutorials6 comments – viewed 26,411 times – ( +20 ) – version all
This tutorial presents a way of separating JS code from views and passing to it values from PHP.