With yii you're able to create ajax requests and updates easily. But most times you always want to show a loading indicatior to your user.
With yii you're able to create ajax requests and updates easily. But most times you always want to show a loading indicatior to your user.
This tutorial shows how to use a model to save and validate related (MANY_MANY) models.
I've found useful to have a step by step reference guide to work with Git with most used commands, feel free to update it with useful information you may find interesting too.
If we want to set meta tags on a per page (controller-action) basis, we may use the clientScript application component.
p.s. latest version of this tutorial is always available unter the docs/ folder of the User Management Module.
I found a better solution.
Usually when we use AutoComplete in a project, We need to show "title" or "name" in the list, while when the form is posted, we need some sort of integer ID referring to the selected value. Out of the Box, CJuiAutoComplete widget doesn't provides different display text and post values.
In this tutorial we will try to save cgridview filter(search) with title etc. basically we want to save two forms data i.e one represents filters and other data about filters like title, description etc. You can define your own structure for filter saving table here are some basic steps
Inspired by it I extended the CButtonColumn class like this:
This tutorial will guide you through the process of creating a yii application using Cloud9. We will use a git workspace to enable version control and also show how to link the Cloud9 workspace to GitHub.
These are functions that I used very often, may helps you!
A time ago i've met the issue that Yii doesn't run any client-side form validation when submitting the form by CHtml::ajaxSubmitButton. The small javascript below helps to fix it.
Lots of people are asking how to solve it with YII,We think its difficult with YII. But its easy to solve . There is no database triggers needed . we can simply sove it by extending a class(say "RActiveRecord") from CActiveRecord .Then extend all our model classes from that class.
Validators extending from [CValidator] all have a property named [message|CValidator::message]. You can set this property in the corresponding validation rule to customize the error message. For example, the following validation rule uses an error message that is different from the default one:
Here's a simple way to create a breadcrumb widget to be used in your templates. The idea is just to isolate how the breadcrumb is generated based on an array of crumbs.
The Yii documentation states:
When you need to integrate with other frameworks (e.g. Zend Framework), you have to follow these steps:
I would like to share my little experience with Yii to the community in the form of the below small wiki:
In this guide I will explain best practise regarding performance in MySQL, PHP and of course our loved Yii Framework. Since this is a complex topic, I will start with some basics and then expand this guide from time to time. Since this wiki can become big, you may click on View history
- there you can see what changes have been made, so you don't miss anything.