Wiki

Sorted by commentsX
Displaying 101-110 of 785 result(s).

Creating a CSS Driven Drop Down Menu using CMenu

Created 5 years ago by blindMoeHow-tos10 comments – viewed 85,300 times – ( +22 / -1 ) – version 1.1
CMenu offers great functionality and the ability to customize just about every aspect of the output. There are many times when I need to create a drop down menu or simply modify the look to make the designers happy. Because this seems to be a common task for me, I figured I would share my code to create a very simple drop down menu that other people could use.

How to automate timestamps in ActiveRecord models

Created 7 years ago by dalipTutorials9 comments – viewed 144,717 times – ( +32 ) – version 1.1
There are many ways to automate the setting of timestamps in yii ActiveRecord models. Three are presented here:

Using counters with ActiveRecord

Created 5 years ago by davi_alexandreTips9 comments – viewed 28,754 times – ( +14 / -1 ) – version 1.1
Let's say, for example, that you are developing a blog or some kind of CMS and you want to track the number of times each post was viewed (maybe to show a list of the most viewed ones).

Exporting CGridView results to CSV file

Created 4 years ago by RusAlexTutorials9 comments – viewed 45,444 times – ( +6 / -3 ) – version 1.1
A few days ago, i worked for CGridView exporting functional for my client. He asked me to create a simple exporting to a CSV file a CGridView search results.
tags: cgridview, export, csv

Creating a database-driven hierarchical Structure combined with CMenu and superfish

Created 7 years ago by thyseusTutorials9 comments – viewed 48,205 times – ( +15 ) – version 1.1
Note: Please also take a look at the newer EMenu extension. This works even better that the deprecated CDropDownMenu!
tags: menu

Events explained

Created 4 years ago by pligorTutorials9 comments – viewed 37,404 times – ( +22 / -3 ) – version 1.1
Let's see what exactly are the events in Yii!

Caching strategy

Created 3 years ago by darkheirHow-tos9 comments – viewed 6,662 times – ( +5 / -1 ) – version 1.1
Note: Before reading this wiki you should have read the caching part in the Yii guide
tags: caching, filter

A Multi-Tenant Strategy using Yii and MySQL

Created 3 years ago by JFReyesHow-tos9 comments – viewed 22,068 times – ( +10 ) – version 1.1
This article describes an implementation of multi-tenancy using Yii and MySQL.

Update CGridview row separately using ajax request

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos9 comments – viewed 14,661 times – ( +7 ) – version 1.1
There are cases you want to update a record on CGridview directly

A simple action for CJuiAutoComplete

Created 5 years ago by tydeas_drTips9 comments – viewed 37,692 times – ( +17 / -1 ) – version 1.1
More or less I use auto-complete field for a form. CJuiAutoComplete is a yii widget for this purposes. The common use case is to make an ajax request and retrieve a list from the database. So in this case you have to write a controller action to return you a json encoded list. What if I had a generic action to do this work for me?