Wiki

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

Using filters with CGridView and CArrayDataProvider

Created 6 years ago by marcovtwoutHow-tos33 comments – viewed 73,452 times – ( +23 / -1 ) – version 1.1
Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

Yii 2 list of path aliases available with default basic and advanced app.

Created 3 years ago by Kartik VTips2 comments – viewed 94,915 times – ( +53 / -6 ) – version 2.0
If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

Integrating Wordpress and Yii: still another approach, using Yii as the router/controller

Created 5 years ago by acorncomHow-tos23 comments – viewed 60,947 times – ( +22 / -1 ) – version 1.1
A lot of people have written posts on integrating Yii and WordPress. This article combines goncin's approach with an article I read about integrating Symfony and WordPress and applies it all to Yii and WordPress.

Impersonate Users within Yii Framework

Created 6 years ago by WoilTutorials6 comments – viewed 17,525 times – ( +22 / -1 ) – version 1.1
For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

How to use single form to collect data for two or more models (CActiveForm and Ajax Validation edition)

Created 6 years ago by RusAlexHow-tos9 comments – viewed 56,963 times – ( +22 / -1 ) – version 1.1
With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.

Accessing data in a join table with the related models

Created 5 years ago by fsbHow-tos8 comments – viewed 113,183 times – ( +28 / -2 ) – version 1.1
Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created 5 years ago by c@cbaTutorials3 comments – viewed 64,247 times – ( +28 / -2 ) – version 1.1
    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this: 'value'=>'$data->author->username',.     Now we might want to use $data in the declaration of the htmlOptions attribute, which is normally not possible, to generate for example the tag <td id="3" class="name_3">, where 3 is the id of the data model for the current row, i.e. $data->id. That is, we want to be able to use: 'htmlOptions'=>array('id'=>'$data->id', 'class'=>'"name_{$data->id}"')     Here's a way to accomplish this...

Dynamic parent and child CGridView on single view. Using $.ajax to update child gridview via controller, after row in parent gridview was clicked.

Created 5 years ago by Gerhard LiebenbergTutorials20 comments – viewed 93,182 times – ( +28 / -2 ) – version 1.1
This wiki is a step-by-step example explaining how the controller, model and the view's CGridView work together. It explains simple things - as well as more complex things that you will anyway quickly have to know. So, even if you don't use dynamic gridviews, take a morning off and thoroughly work through this tutorial. It should save you lots of struggling.

Implementing a User Level Access System

Created 6 years ago by Antonio RamirezTutorials12 comments – viewed 53,613 times – ( +28 / -2 ) – version 1.1
I would like to provide you a quick tip on how to implement user level access to your Yii applications.

Url: hide index.php

Created 6 years ago by HermansHow-tos16 comments – viewed 188,582 times – ( +28 / -2 ) – version 1.1
Maybe it looks simple, but some time ago I need some time to find a solution of this case. I finally got it, and I want to share that I also experienced such cases. So that it can make reference.