Wiki

Articles in category "tutorials", sorted by date (updated)X
Displaying 61-70 of 172 result(s).

Using search engine and user friendly URLs

Updated 10 months ago by Yang HeTutorials6 comments – viewed 38,701 times – ( +18 )
The Definitive Guide introduces the fundamentals of managing URLs in a Yii application. In this tutorial, we introduce a practical technique that can quickly turn your application into using search-engine-friendly URLs.
tags: SEO, URL

Encapsulate db and module configurations

Updated 10 months ago by Yang HeTutorials3 comments – viewed 6,663 times – ( +6 )
This method was inspirated on the excellent text about different environments available at http://www.yiiframework.com/doc/cookbook/32/
tags: module

How to use default layout for error pages instead of errorXXX views

Updated 10 months ago by Yang HeTutorials1 comment – viewed 10,561 times – ( +4 )
The issue is covered in "The Definite Guide to Yii" (Error Handling - Handling Errors Using an Action).

How to add ajax-loading indicators

Updated 10 months ago by Yang HeTutorials5 comments – viewed 24,486 times – ( +25 )
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.
tags: AJAX

Adding login form to each page

Updated 10 months ago by Yang HeTutorials5 comments – viewed 18,060 times – ( +3 / -1 )
After adding proper form to the main layout, like:

Enabling Gzip

Updated 10 months ago by Yang HeTutorials5 comments – viewed 11,327 times – ( +5 / -1 )
Adding HTTP compression to your application could never have been easier!

Use shortcut functions to reduce typing

Updated 10 months ago by Yang HeTutorials8 comments – viewed 27,244 times – ( +47 )
Because Yii intends to be integrated nicely with third-party libraries, it does not define any global functions. Everything in Yii needs to be addressed with full class name or object scopes. For example, to access the current user, we need to use Yii::app()->user; to access application parameters, we need Yii::app()->params['name']; and so on. While editors like textmate can help alleviate the problem of these lengthy typings, it is worthwhile to define global shortcut functions to some commonly used method calls. They will make the application code look cleaner.

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

Updated 10 months ago by Yang HeTutorials2 comments – viewed 23,297 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 10 months ago by Yang HeTutorials9 comments – viewed 48,014 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 10 months ago by Yang HeTutorials19 comments – viewed 138,792 times – ( +84 / -2 )
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