Wiki

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

How to Setting Layouts in Yii

Created about a year ago by ruderbytesHow-tos2 comments – viewed 39,339 times – ( +2 / -5 ) – version 1.1
usually someone confused to make layouts in yii.

Yii registry, how to use it, does it exist at all?

Created 3 years ago by dckurushinHow-tos2 comments – viewed 18,120 times – ( +7 / -1 ) – version 1.1
From time to time people ask about registry...

CGridView. Add custom class to table rows preserving original „odd“ and „even“

Created about a year ago by Maug LeeHow-tos2 comments – viewed 20,209 times – ( +5 ) – version 1.1
Lets say we have such a CGridView widget showing a list of users for administrator. Users have status „active“ or „disabled“. Grid widget puts class „odd“ or „even“ to rows and we want to preserve this. So we want to add a class „disabled“ to rows with disabled users.

Integrating ZF2 into Yii - use case demonstrated

Created about a year ago by BoazHow-tos2 comments – viewed 4,902 times – ( +10 ) – version 2.0
I needed to use a class from ZF2 in my Yii project. I've read probably all there is about this subject and still I needed lots of trial & errors to get it working, probably due to my lack of experience working with namepsaces and ZF2 in general. Also, the resources on the web are all partial, at best. Most simply refer to ZF1 where things are technically different. When I got it all working I decided to record my findings and that's how this article was born. The below recipe is what worked for me, accompanied by relevant comments. References: This article is partially based on this guide page. Be sure also to consult Zend Framework 2 documentation.

Reliable Alternative For Yii::app()->request->isAjaxRequest AND Adding Data To Ajax Form With JS

Created 3 years ago by ibo_sHow-tos2 comments – viewed 35,270 times – ( +15 / -1 ) – version 1.1
In this How-To I'll show you:

Building Page Specific Menus using CMenu

Created about a year ago by mistrybHow-tos1 comment – viewed 7,819 times
The Yii Framework provides a sweet functionality that allows you to easily create page specific menus. What does this mean? This allows you to create one layout or CSS styling for your menu, and when each page is loaded, a new set of menu items is loaded in. This is useful for context specific sidebars within your application.
tags: CMenu

How to validate CSRF token with session

Created 2 years ago by yangmlsHow-tos1 comment – viewed 33,557 times – ( +20 ) – version 1.1
First of all, You must change component config to enable the default Yii CSRF validation.
tags: CSRF, session

Simple authorization system

Created 2 years ago by GustavoHow-tos1 comment – viewed 24,489 times – ( +16 ) – version 1.1
How to create a simple (non-RBAC) authorization system

how to make a dynamic progress bar to show the percentage or status

Created about a year ago by hehbhehbHow-tos1 comment – viewed 15,106 times – ( +5 ) – version 1.1
Yii have a CJuiProgressBar, but it is static. If we want a dynamic progress bar to show the percentage or status, we have to do more things. I make it successfully and am glad to share it with you.

Rendering a view file in a console application

Created 2 years ago by TompiHow-tos1 comment – viewed 7,947 times – ( +4 / -2 ) – version 1.1
When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.