Yii Articles
13 articles on Yii, newest first.
How to make Yii checkBoxList selected
Learn how to preselect previously saved checkboxes in Yii 1.1 using CHtml::checkBoxList() and a MANY_MANY relationship. This guide explains how to retrieve selected book IDs and display them as checked when updating an author’s record.
Yii Multiple Related Models Save Guide
Learn how to save multiple related models in Yii 1.1 using ActiveRecord relationships, HAS_MANY, dynamic child forms, and ESaveRelatedBehavior. This guide shows how to save parent and child records together with a single form submission while reducing repetitive database transaction and loop code.

Separate Front & Admin in Yii
Split a Yii 1.1 app into a front end and an admin panel with separate controllers, views and config files, a custom behavior, and clean backend URLs.

Yii 1.1: Behaviors & Events
Learn how Yii 1.1 behaviors and events work: attach reusable methods to components, handle application events, and use behaviors with Active Record models.

Switch Yii layout based on user role
This article explains how to switch Yii layouts based on user roles using a custom filter. Learn how to configure role-based layouts, preserve controller filters, troubleshoot common issues, and follow best practices in Yii 1.x.
Table 'DATEBASE_NAME.AuthAssignment' doesn't exist
Running into the “Table ‘AuthAssignment’ doesn’t exist” error after deploying a Yii application to Linux? This guide explains why the Yii Rights RBAC module may fail due to database table-name capitalization and shows how to fix the issue by matching your Yii configuration with the actual database table names. You’ll also find troubleshooting steps, deployment tips, and FAQs to help prevent similar database errors.

Keeping your Yii Models Lean - Use Behaviors
Keep Yii Active Record models lean by moving business logic like timestamps, logging and approval workflows into reusable, attachable behaviors.

Yii password, repeat password fields
Learn how to validate password and repeat password fields in Yii 1.1 using the compare validator, scenarios, and secure password hashing.
Yii Rights: Get all assigned roles of a user
Learn how to retrieve user roles in Yii Framework using the authassignment table, CDbCommand, and queryAll(). This guide explains how to fetch and store user roles, use parameter binding for safer SQL queries, leverage Yii’s built-in authorization manager, and implement role-based access control in PHP applications.

Disabled Yii logs and stack trace messages
Learn how to enable and configure Yii debugging using YII_DEBUG and YII_TRACE_LEVEL. This guide explains how Yii debug settings work, how to view detailed error information, and why debugging should be disabled on production websites.
Allow admin to change user role
Learn how to allow administrators to change user roles in Yii using the Rights module. This guide explains how to add a role dropdown to the user form, assign roles when creating users, update roles when editing accounts, and securely revoke previous roles before assigning new ones.
Remove index.php from URL in Yii
Learn how to configure Yii's UrlManager and Apache .htaccess rules to create clean, user-friendly URLs. This guide covers URL configuration, rewrite rules, common issues, and practical tips for improving Yii application routing

Integrate Filemanager to FCKeditor in YII
Before starting the tutorial you may also like to view the fully functional demo, or you may download the example and start working on it. Please note that this