Wiki

Articles in category "tips", sorted by viewsX
Displaying 61-70 of 142 result(s).

Using events with CAction classes

Created 3 years ago by Antonio RamirezTips0 comments – viewed 11,521 times – ( +9 ) – version 1.1
There are some good guides out there explaining how to work with events and the ways to attach them to your components, but none (that I know) explain the following way to configure your events with CAction classes on your controllers the following way.

CJuiTabs Content

Created 2 years ago by mbalaTips2 comments – viewed 11,290 times – ( +6 ) – version 1.1
When I used CJuiTabs I did something. They are
tags: CJuiTabs

Managing constants easily

Created 3 years ago by briiC.lvTips4 comments – viewed 11,233 times – ( +4 ) – version 1.1
For time to time i have models with constants (basicly status constants) which i use in diferent places and if these constant changes, i have to change mentions of constant in code elsewhere.

How to ensure unicity to url

Created 3 years ago by zaccariaTips3 comments – viewed 10,972 times – ( +14 ) – version 1.1
Many time for SEO porpouses is important that each page will have a unique address.
tags: SEO, unique, URL

URL component access functions

Created 3 years ago by Steve FriedlTips1 comment – viewed 10,889 times – ( +28 ) – version 1.1
Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest class wraps various $_SERVER variables to break down the URL into its constituent parts.
tags: URL, request

Yii 2 list of path aliases available with default basic and advanced app.

Created 8 months ago by Kartik VTips1 comment – viewed 10,234 times – ( +35 / -5 ) – version 2.0
If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

ChromePHP for Yii

Created 4 years ago by imeheszTips0 comments – viewed 10,138 times – ( +3 / -2 ) – version 1.1
ChromePHP is a console logging extension for Google Chrome.

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

Created 2 years ago by Xgamer99Tips3 comments – viewed 10,107 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.

Adding a link to a CDataColumn

Created about a year ago by le_topTips6 comments – viewed 10,042 times – ( +3 ) – 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.

Yii code completion and calltips in Komodo Edit

Created 4 years ago by viterTips1 comment – viewed 9,983 times – ( +6 ) – version 1.1
My favourite editor is Komodo Edit (free and crossplatform) and I use it for my everyday coding work. Just recently I found out how to make it help me to work with Yii. :) So follow these steps:
tags: Komodo Edit