Wiki

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

Searching and sorting by related model in CGridView

Created 4 years ago by Maciej Li┼╝ewskiTutorials86 comments – viewed 183,237 times – ( +126 ) – version 1.1
Lets say we have two models and relation between them:

How-To: Create a REST API

Created 5 years ago by jwernerHow-tos56 comments – viewed 328,187 times – ( +113 / -1 ) – version 1.1
This article will explain how to create a REST API with the Yii framework.

Creating a dependent dropdown

Created 7 years ago by dalipTutorials53 comments – viewed 315,612 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.

YiiBoilerplate - Setup a professional project structure in seconds

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

CJuiDialog to create new model

Created 5 years ago by zaccariaTutorials53 comments – viewed 94,158 times – ( +68 ) – 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 5 years ago by qiangOthers42 comments – viewed 160,200 times – ( +87 ) – 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 4 years ago by c@cbaTutorials37 comments – viewed 56,356 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.

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

Created 7 years ago by qiangTutorials33 comments – viewed 203,891 times – ( +118 / -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:

XUpload Workflow

Created 4 years ago by AsgarothTutorials33 comments – viewed 68,895 times – ( +34 ) – version 1.1
This wiki describes a more complex workflow using the XUpload widget

Using filters with CGridView and CArrayDataProvider

Created 5 years ago by marcovtwoutHow-tos33 comments – viewed 67,923 times – ( +22 ) – version 1.1
Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.