Wiki

Articles in category "tutorials"X
Displaying 221-230 of 249 result(s).

How to add a named scope to ActiveRecords with a behavior

Created 7 years ago by MikeTutorials2 comments – viewed 20,482 times – ( +4 ) – version 1.1
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 7 years ago by qiangTutorials3 comments – viewed 38,596 times – ( +12 ) – version 1.1
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 7 years ago by qiangTutorials2 comments – viewed 98,684 times – ( +24 ) – version 1.1
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 7 years ago by OriginalCopyTutorials3 comments – viewed 32,977 times – ( +5 / -1 ) – version 1.1
The Yii documentation states:
tags: module

Setting and maintaining the language in Application (i18n)

Created 7 years ago by olafureTutorials12 comments – viewed 97,523 times – ( +23 ) – version 1.1
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 7 years ago by luoshibenTutorials5 comments – viewed 49,568 times – ( +8 / -3 ) – version 1.1
Note: CAutoComplete is deprecated since Yii 1.1.3. Consider using CJuiAutoComplete.

Creating a dependent dropdown

Created 7 years ago by dalipTutorials53 comments – viewed 310,272 times – ( +111 / -3 ) – version 1.1
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.

How to create a breadcrumb widget

Created 7 years ago by knutTutorials4 comments – viewed 67,250 times – ( +13 ) – version 1.1
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 display static pages in Yii?

Created 7 years ago by qiangTutorials2 comments – viewed 58,117 times – ( +19 ) – version 1.1
In a Web application, we often need to display pages like "about this site", "legal information", whose content are mostly static. There are several approaches to deal with this kind of pages.
tags: static pages

How to work with flash messages

Created 7 years ago by pfthTutorials12 comments – viewed 239,726 times – ( +59 ) – version 1.1
Set your messages in a controller: