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

Searching and sorting by related model in CGridView

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

How-To: Create a REST API

Created 4 years ago by jwernerHow-tos56 comments – viewed 290,047 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 6 years ago by dalipTutorials53 comments – viewed 291,751 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 3 years ago by Antonio RamirezOthers53 comments – viewed 53,451 times – ( +48 ) – version 1.1
tags: directory, config

CJuiDialog for create new model

Created 4 years ago by zaccariaTutorials53 comments – viewed 89,596 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 4 years ago by qiangOthers41 comments – viewed 143,312 times – ( +85 ) – version 1.1
In this article, we describe the directory structure used by - 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 51,293 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 in english, and 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 6 years ago by qiangTutorials33 comments – viewed 186,268 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 3 years ago by AsgarothTutorials33 comments – viewed 62,355 times – ( +34 ) – version 1.1
This wiki describes a more complex workflow using the XUpload widget

Using filters with CGridView and CArrayDataProvider

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