Wiki

Sorted by viewsX
Displaying 461-470 of 766 result(s).

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created 3 years ago by Xgamer99Tips3 comments – viewed 12,118 times – ( +1 ) – version 1.1
I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it or on the 'select all' checkbox.

Alternative folder structure for a standard Yii app

Created 2 years ago by TrejderHow-tos4 comments – viewed 11,868 times – ( +5 ) – version 1.1
I found a standard Yii app's protected folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.

Use kartik Growl with Yii2 flash messages

Created 11 months ago by skwordenHow-tos1 comment – viewed 11,829 times – ( +6 ) – version 2.0
This is to show you how to use Yii2 flash messages with Kartik Growl (bootstrap notify wrapper).

Ordering Models by Weight with CJuiSortable

Created 5 years ago by Matt KelliherTutorials2 comments – viewed 11,764 times – ( +10 ) – version 1.1
In this tutorial we will be setting up a content type to be ordered by weight using the JUI Sortable plugin.

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 3 years ago by BoazHow-tos2 comments – viewed 11,736 times – ( +7 / -1 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

caching controllers with filters()

Created 4 years ago by RusAlexHow-tos1 comment – viewed 11,720 times – ( +2 ) – version 1.1
Hello, this article will describe some aspects about caching controllers with filters() method in your controller. And I will describe some problems I meet when using this approach for caching, the main problem was

Advanced CTabView using CClipWidget

Created 7 years ago by krillzipTutorials1 comment – viewed 11,662 times – ( +2 ) – version 1.1
Here is a way to dynamically extend tabs based on clips. Probably even more complex things could be done.

Simple Way to Upload and Save File

Created about a year ago by Misbahul D MunirTutorials0 comments – viewed 11,652 times – ( -2 ) – version 2.0
This tutorial need extension mdmsoft/yii2-upload-file. Follow the intruction to install. After installation done, create controller and action

Using CListView to display items next to each other (in columns)

Created 2 years ago by thyseusTips4 comments – viewed 11,544 times – ( +11 )
When using CListView to display multiple views next to each other, we can use the $index variable inside the viewFile to achieve this. As far as i know there is no extension or out-of-the-box functionality for this, so we need to apply a little hack:

How to: use github for download yii, create new app, and store our modules or extensions.

Created 3 years ago by sensorarioHow-tos1 comment – viewed 11,534 times – ( +8 ) – version 1.1
Yesterday I've written a module for myself. Just an experiment. When I was feeling satisfied, I've created a repository on github, and pushed my code. My module and yii are on github. So I'll show you a "new" way to start our yii projects.
tags: github, git