Wiki

Articles in category "tutorials", sorted by date (updated)X
Displaying 71-80 of 175 result(s).

How to create/save more Model inputs and make them repeatable with jQuery

Updated 11 months ago by Yang HeTutorials2 comments – viewed 23,960 times – ( +10 )
This is the first real problem that I encountered using Yii, trying to make a Model input repeatable in the form, validate and save them.

Setting and maintaining the language in Application (i18n)

Updated 11 months ago by Yang HeTutorials9 comments – viewed 49,757 times – ( +19 )
As seen in this post, Yii doesn't enforce how language is set and maintained within the session.
tags: i18n, translation

Creating a dependent dropdown

Updated 11 months ago by Yang HeTutorials22 comments – viewed 144,149 times – ( +88 / -3 )
Often you'll need a form with two dropdowns, and one dropdown's values will be dependent on the value of the other dropdown. Using Yii's built-in AJAX functionality you can create such a dropdown.
tags: AJAX

How to create a breadcrumb widget

Updated 11 months ago by Yang HeTutorials4 comments – viewed 32,137 times – ( +10 )
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.

How to generate Web feed for an application

Updated 11 months ago by Yang HeTutorials6 comments – viewed 13,123 times – ( +4 )
Web feed is a data format used for providing users with frequently updated content. In this article, we describe how to use Zend_Feed, an excellent component from Zend Framework to generate Web feed for an Yii application. This article can also serve as a general guide on how to use other components in Zend Framework.

How to use a single form to collect data for two or more models?

Updated 11 months ago by Yang HeTutorials10 comments – viewed 81,748 times – ( +89 )
Assume we want to use a single HTML form to collect input for both model A and model B, and we want to display input errors (if any) in the same error summary box. We can define the following action code:

How to customize Yii core messages?

Updated 11 months ago by Yang HeTutorials6 comments – viewed 28,805 times – ( +14 )
Yii core messages refer to static text strings in the core Yii framework code which are meant to be displayed to end-users (e.g. core exception messages, default validation error messages). Customization of these core messages is needed in two circumstances:

AutoTimestampBehavior

Updated 11 months ago by Yang HeTutorials1 comment – viewed 7,735 times – ( +2 / -2 )
Note: currently a variant of this class CTimestampBehavior is included into Yii distribution package.

How to add more information to Yii::app()->user

Updated 11 months ago by Yang HeTutorials1 comment – viewed 70,441 times – ( +19 )
By default, the expression Yii::app()->user returns a CWebUser application component which represents the information that are closely related with the current user. Some information can be persistent throughout the current user session. For example, CWebUser already comes with a name property that stores the username of the current user.

First Yii App: CTabView

Updated 11 months ago by Yang HeTutorials1 comment – viewed 14,130 times – ( -2 )
Once you are completed with the "Creating First Yii Application", the following can be done.