Wiki

Sorted by commentsX
Displaying 1-10 of 727 result(s).

Searching and sorting by related model in CGridView

Created 3 years ago by redguyTutorials78 comments – viewed 136,288 times – ( +120 ) – version 1.1
Lets say we have two models and relation between them:

How-To: Create a REST API

Created 3 years ago by jwernerHow-tos55 comments – viewed 240,133 times – ( +110 / -1 ) – version 1.1
This article will explain how to create a REST API with the Yii framework.

YiiBoilerplate - Setup a professional project structure in seconds

Created 2 years ago by Antonio RamirezOthers53 comments – viewed 48,746 times – ( +48 ) – version 1.1
YiiBoilerplate
tags: directory, config

Creating a dependent dropdown

Created 5 years ago by dalipTutorials52 comments – viewed 262,895 times – ( +109 / -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.

CJuiDialog for create new model

Created 3 years ago by zaccariaTutorials47 comments – viewed 82,373 times – ( +66 ) – version 1.1
In this tutorial we will learn how to realize a create interface using a dialog.

The directory structure of the Yii project site

Created 3 years ago by qiangOthers40 comments – viewed 124,987 times – ( +81 ) – version 1.1
In this article, we describe the directory structure used by yiiframework.com - the official Yii framework website. While this structure may look overly complicated for small projects or may not be optimal in some sense, we believe it is appropriate for medium or large projects in a team development environment. In fact, we have successfully used the similar structure in some other big projects.
tags: directory, config

SEO-conform Multilingual URLs + Language Selector Widget (i18n)

Created 3 years ago by c@cbaTutorials36 comments – viewed 44,324 times – ( +32 ) – version 1.1
You have a multilingual application, and you want the URL of a page to be different for different languages, to account for SEO. The URL for the contact page for example should look like http://something.com/en/contact in english, and http://something.com/de/contact in german. This tutorial describes how to make it happen. Note that currently selected language is always a part of the URL, and thus available to the application through $_GET. You don't have to use sessions variables to keep track of the language if you don't want to.

XUpload Workflow

Created 2 years ago by AsgarothTutorials32 comments – viewed 53,026 times – ( +34 ) – version 1.1
This wiki describes a more complex workflow using the XUpload widget

Using filters with CGridView and CArrayDataProvider

Created 3 years ago by marcovtwoutHow-tos31 comments – viewed 51,067 times – ( +21 ) – version 1.1
Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

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

Created 5 years ago by qiangTutorials30 comments – viewed 160,239 times – ( +114 / -1 ) – version 1.1
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: