Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 191-200 of 355 result(s).

Get 'source' data from the database - for TbEditableColumn or EditableColumn ('type'=>'select' / dropdownlist)

Created 4 years ago by Gerhard LiebenbergHow-tos0 comments – viewed 17,187 times – ( +4 / -2 ) – version 1.1
If you want to edit data directly in the gridview in a 'dropdownlist' style, then you could use the 'type' => 'select' option of TbEditableColumn (YiiBooster) or EditableColumn (x-editable for Yii). This wiki shows how to get data from the db for the 'dropdownlist', by converting AR model data into an array that is passed in json format.

How to hide `index` action from URL

Created 5 years ago by rootbearHow-tos2 comments – viewed 16,921 times – ( +3 / -3 ) – version 1.1
Here is my experiment inspired by my own question and others from the forum.
tags: index

get summary of related model via STAT relation

Created 3 years ago by rootbearHow-tos2 comments – viewed 16,876 times – ( +7 / -2 ) – version 1.1
typical scenario: invoice, invoice items.

Open Dialog from ajax content

Created 4 years ago by TouzasHow-tos1 comment – viewed 16,795 times – ( +4 / -2 ) – version 1.1
This tutorial will show you how to create Ajax dialog. It's very simple code.

Create sitemap.xml file dynamically on root folder with one hit

Created 4 years ago by kiran sharmaHow-tos1 comment – viewed 16,729 times – ( +5 / -6 ) – version 1.1
I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
tags: SEO, SiteMap, XML

Sub-domains with different databases in Yii!

Created 6 years ago by jwerdHow-tos5 comments – viewed 16,643 times – ( +2 / -1 ) – version 1.1
Sub-domains with different databases in Yii!

Insert a multirow header in CGridView

Created 4 years ago by PeppeHow-tos2 comments – viewed 16,625 times – ( +6 / -1 ) – version 1.1
The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way you can write columns grouping headers, and obtain a nicer view.

Changing Controllers Name

Created 6 years ago by TrejderHow-tos0 comments – viewed 16,477 times – ( +5 / -1 ) – version 1.1
This very short how-to presents steps required to change controller name. It is oriented for less experienced users, which are starting their journey with Yii, to avoid common newbie pitfalls.

Login Form With email or Whatever

Created 3 years ago by nabil abdoualiHow-tos1 comment – viewed 16,221 times – ( -3 ) – version 1.1
Here is my solution to login with email or anything else This update works with database mysql You must generate the user model with GII