Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 211-220 of 297 result(s).

Create custom button button with AJAX function in CGridView

Created about a year ago by nkdHow-tos1 comment – viewed 30,772 times – ( +14 ) – version 1.1
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki. This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.

Managing a star rating with the StarRating widget in Yii 2

Created 2 months ago by Kartik VHow-tos1 comment – viewed 1,155 times – ( +25 / -5 ) – version 2.0
In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

Create sitemap.xml file dynamically on root folder with one hit

Created about a year ago by kiran sharmaHow-tos1 comment – viewed 9,308 times – ( +5 / -4 ) – version 1.1
I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
tags: SEO, SiteMap, XML

caching controllers with filters()

Created 3 years ago by RusAlexHow-tos1 comment – viewed 9,375 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

MigrateCommand class for multiple sites using one code base

Created about a year ago by Hudson NguyenHow-tos1 comment – viewed 2,889 times – ( +1 ) – version 1.1
My CMS supports multiple sites using one code base therefore the db connection can only be configured by detecting the site's domain.

Turn Web HTML Into Newsletter

Created about a year ago by yasenHow-tos1 comment – viewed 6,810 times – ( +7 ) – version 1.1
These newsletters have always been hard to create as regular web HTML is not properly read by web email interfaces and email clients. I thought that the simplest solution would be to use a web page that would serve as a web version of the newsletter and turn it somehow into newsletter HTML.

Using Bootstrap with LESS

Created about a year ago by Chris83How-tos1 comment – viewed 31,834 times – ( +14 ) – version 1.1
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.

Book Has Author - Many to Many relations using Kartik\Select2

Created about a month ago by thiagoc7How-tos1 comment – viewed 1,888 times – version 2.0
I could make this work following same useful tips from this post.

Limit a CGridView field to some preset length.

Created about a year ago by le_topHow-tos1 comment – viewed 7,335 times – ( +12 ) – version 1.1
Sometimes text inside a gridview column is just too long. That's why I figured out a way to make the column smaller while still providing the information.

I18n / localised routes in Yii

Created 17 days ago by ElecenHow-tos1 comment – viewed 895 times – ( +2 / -1 ) – version 1.1
So, you need localised urls made simple that follow the Yii framework guidelines?
tags: i18n, Routing