Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 81-90 of 341 result(s).

Using setFlash for displaying various kind of messages

Created 4 years ago by TrejderHow-tos6 comments – viewed 51,136 times – ( +4 / -5 ) – version 1.1
In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.
tags: flash, error, message

Update CGridview row separately using ajax request

Created about a year ago by Kostas Apazidis (KonApaz)How-tos6 comments – viewed 8,989 times – ( +6 ) – version 1.1
There are cases you want to update a record on CGridview directly

Hyphenation of routes in URL management

Created 2 years ago by qiangHow-tos6 comments – viewed 17,691 times – ( +19 ) – version 1.1
In this article, we introduce an approach that allows automatic hyphenation of the route part in URLs.
tags: URL

Handling Bootstrap active tabs in Yii via URL

Created 2 years ago by JamesBarnsleyHow-tos6 comments – viewed 19,977 times – ( +7 ) – version 1.1
As a lead developer at Mutable Labs I found that when using the Yii Bootstrap tabs component you will sometimes want to direct the user to a specific tab and not necessarily the first tab. Yii Bootstrap already provides the "active" variable so you can define whether the tab is the active tab or not in PHP. I generally find though that a PHP solution to this problem is rather cumbersome as every tab component will need the PHP code inserted or you will have to extend the tab component somehow to do it.

Bootstrap Yii cGridView add popup button

Created about a year ago by Arockia JohnsonHow-tos6 comments – viewed 7,390 times – ( +4 ) – version 1.1
Hi,

Run Yiic directly from your app without a shell

Created 3 years ago by jacmoeHow-tos6 comments – viewed 25,935 times – ( +18 ) – version 1.1
Sometimes it would be nice if we could run yiic from an action, for example a migrate database button in our admin panel. Or because you are on a host which doesn't have shell access. Or maybe you are not allowed run popen or exec.

Use CGridview to sort and filter CSqlDataProvider - when used with UNRELATED tables (or complex queries)

Created 8 months ago by Gerhard LiebenbergHow-tos6 comments – viewed 6,443 times – version 1.1
I have two tables called hospitals and departments. I have a junction table between them which holds the departments in each hospital. But sometimes I need a list of "All hospitals with All possible departments" - regardless of whether they are linked in the junction table or not.

CGridView keep state of page and sort.

Created 3 years ago by DanielHow-tos5 comments – viewed 22,802 times – ( +6 ) – version 1.1
Remember-filters-gridview is one of the must-use extension on all of my project. However, it lacks of storing the page and sort variables of the grid view.

Displaying image in a CGridView column.

Created 3 years ago by sirin kHow-tos5 comments – viewed 52,139 times – ( +13 / -1 ) – version 1.1
This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.
tags: CGridView, image

CSV Export

Created 3 years ago by JohnPollardHow-tos5 comments – viewed 13,638 times – ( +4 ) – version 1.1
I needed a csv export function for my cgridview and I wanted to export the entire result set of the sorted and filtered cgridview the user was viewing via ajax.
tags: csv, export