Wiki

Articles in category "tutorials"X
Displaying 141-150 of 172 result(s).

Organize directories for applications with front-end and back-end

Created 4 years ago by qiangTutorials10 comments – viewed 40,649 times – ( +25 )
Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing directories of the code for both ends.

Manage application configuration in different modes

Created 4 years ago by qiangTutorials4 comments – viewed 20,961 times – ( +14 )
Info: This tutorial references the idea presented in Jonah's excellent blog article.

Use shortcut functions to reduce typing

Created 4 years ago by qiangTutorials8 comments – viewed 27,304 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 add a named scope to ActiveRecords with a behavior

Created 4 years ago by MikeTutorials1 comment – viewed 9,526 times – ( +3 )
Since Yii 1.0.5 you can use named scopes with ActiveRecords. They are a great help in simplifying your query calls.

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

Created 4 years ago by qiangTutorials2 comments – viewed 23,355 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.

How to implement multiple page layouts in an application

Created 4 years ago by qiangTutorials2 comments – viewed 56,409 times – ( +23 )
In this tutorial, we describe how to implement multiple layouts for action views in an application. As an example, we assume that the pages in our application will use three different layouts:
tags: layout

How to access a component of a module from within the module itself

Created 4 years ago by OriginalCopyTutorials1 comment – viewed 10,698 times – ( +2 / -1 )
The Yii documentation states:
tags: module

Setting and maintaining the language in Application (i18n)

Created 4 years ago by olafureTutorials9 comments – viewed 48,136 times – ( +19 )
As seen in this post, Yii doesn't enforce how language is set and maintained within the session.
tags: i18n, translation

Using CAutoComplete to display one value and submit another

Created 4 years ago by luoshibenTutorials5 comments – viewed 32,984 times – ( +7 / -3 )
Note: CAutoComplete is deprecated since Yii 1.1.3. Consider using CJuiAutoComplete.

Creating a dependent dropdown

Created 4 years ago by dalipTutorials20 comments – viewed 139,266 times – ( +85 / -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