Wiki

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

Searching and sorting by related model in CGridView

Created 2 years ago by redguyTutorials74 comments – viewed 117,748 times – ( +109 ) – version 1.1
Lets say we have two models and relation between them:

YiiBoilerplate - Setup a professional project structure in seconds

Created about a year ago by Antonio RamirezOthers53 comments – viewed 42,864 times – ( +47 ) – version 1.1
YiiBoilerplate
tags: directory, config

How-To: Create a REST API

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

Creating a dependent dropdown

Created 5 years ago by dalipTutorials46 comments – viewed 238,228 times – ( +107 / -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 zaccariaTutorials44 comments – viewed 74,707 times – ( +62 ) – 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 qiangOthers37 comments – viewed 111,288 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 2 years ago by c@cbaTutorials35 comments – viewed 38,366 times – ( +29 ) – 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.

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

Created 5 years ago by qiangTutorials30 comments – viewed 137,885 times – ( +109 / -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:

Using filters with CGridView and CArrayDataProvider

Created 2 years ago by marcovtwoutHow-tos30 comments – viewed 44,169 times – ( +20 ) – version 1.1
Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

XUpload Workflow

Created 2 years ago by AsgarothTutorials29 comments – viewed 44,317 times – ( +33 ) – version 1.1
This wiki describes a more complex workflow using the XUpload widget