Wiki

Sorted by viewsX
Displaying 451-460 of 786 result(s).

How to hide `index` action from URL

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

Adding a link to a CDataColumn

Created 4 years ago by le_topTips6 comments – viewed 18,027 times – ( +3 / -1 ) – version 1.1
Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

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

Created 4 years ago by Gerhard LiebenbergHow-tos0 comments – viewed 17,990 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.

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

Created 5 years ago by kiran sharmaHow-tos1 comment – viewed 17,948 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

How to create/update a model with its related items using Listbox or CheckboxList

Created 2 years ago by softarkTutorials4 comments – viewed 17,863 times – ( +4 / -1 ) – version 2.0
Assume we have many categories and many posts.

Customizing Yii's formatting rules (extending CFormatter)

Created 6 years ago by HaenselTips0 comments – viewed 17,828 times – ( +14 / -1 ) – version 1.1
CFormatter is one of Yii's core components and used to format values displayed in widgets like CGridView or CDetailView. All classic formats like numbers, text, urls or datetime are supported but you may have to use a formatting rule that isn't built in. Let's say we want to display arrays of strings (like tags associated with a product model). When using CDetailView we would usually make use of PHPs implode function to create a simple string value of all values in the $product->tags array.

How to create the custom Drop-down using CHtml::dropDownList

Created 3 years ago by Ankit ModiHow-tos1 comment – viewed 17,767 times – ( -1 ) – version all
Hi Friends, This tutorial may be help us create the custom drop-down menu using CHtml::dropDownList

Extending CActiveForm for some form display fixes and language tweaks

Created 7 years ago by TrejderTips0 comments – viewed 17,721 times – ( +5 / -1 ) – version 1.1
In this simple example I'll demonstrate how to extend CActiveForm class to overload some drawing functions to achieve some commonly used fixes in forms.

Open Dialog from ajax content

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

Sub-domains with different databases in Yii!

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