Wiki

Sorted by ratingX
Displaying 131-140 of 467 result(s).

How to customize Yii core messages?

Created 4 years ago by qiangTutorials6 comments – viewed 27,551 times – ( +13 )
Yii core messages refer to static text strings in the core Yii framework code which are meant to be displayed to end-users (e.g. core exception messages, default validation error messages). Customization of these core messages is needed in two circumstances:

1:n relations sometimes require CDbCriteria.together

Created about a year ago by fsbTips4 comments – viewed 13,731 times – ( +13 )
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

Simplified meta tags

Created 3 years ago by Y!!Tutorials1 comment – viewed 18,616 times – ( +13 )
If we want to set meta tags on a per page (controller-action) basis, we may use the clientScript application component.

How to log and debug variables using CWebLogRoute

Created 2 years ago by Antonio RamirezHow-tos4 comments – viewed 28,567 times – ( +13 )
I have seen a couple of articles about how to integrate external libraries to debug our PHP code (i.e. firePHP) but after you read this article you will realize that there is no need for such libraries when using Yii.
tags: Logging

URL management for Websites with secure and nonsecure pages

Created 7 months ago by qiangHow-tos3 comments – viewed 6,361 times – ( +13 )
In this article, I will describe how to manage URLs for a Website that has both secure and nonsecure content.
tags: URL

How to avoid multiple Ajax Request

Created 2 years ago by nickcvHow-tos11 comments – viewed 19,209 times – ( +13 )
CHtml::ajaxLink(), CHtml::ajaxSubmitButton() and similar methods are great, but if they are located inside a portion of the page that is already loaded via ajax something bad will happen, something you may even not notice if you are not using tools like firebugs: the sent ajax requests will multiply themselves.

Using Bootstrap with LESS

Created 3 months ago by Chris83How-tos1 comment – viewed 10,369 times – ( +13 )
I discovered Twitter Bootstrap almost two years ago. After trying it out for a while I fell in love with it. It didn't take long before I realized that it would be great to write an extension that allowed developers to start using Bootstrap in their Yii projects. One night I sat down and started writing what later became my now popular bootstrap extension. Now that the extension is quite widely used in the community I felt that it was time to write about how to use Bootstrap to its full potential. If you use the Bootstrap CSS files you're really missing out on some great features. After reading this article you'll be able to take full advantage of Bootstrap using LESS.

Creating a CSS Driven Drop Down Menu using CMenu

Created about a year ago by blindMoeHow-tos7 comments – viewed 36,064 times – ( +19 / -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 customize the error message of a validation rule

Created 4 years ago by qiangTutorials3 comments – viewed 29,633 times – ( +12 )
Validators extending from CValidator all have a property named message. You can set this property in the corresponding validation rule to customize the error message. For example, the following validation rule uses an error message that is different from the default one:

Database driven Cmenu

Created about a year ago by twisted1919How-tos1 comment – viewed 10,669 times – ( +12 )
This is a simple example that will give you a base for designing a database driven menu system that will use CMenu to be rendered.