Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 61-70 of 354 result(s).

Creating a CSS Driven Drop Down Menu using CMenu

Created 5 years ago by blindMoeHow-tos10 comments – viewed 84,785 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 translate and do the translations the easy way

Created 5 years ago by Roman SolomatinHow-tos3 comments – viewed 65,211 times – ( +28 / -2 ) – version 1.1
I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.

Drop down list with enum values for column of type ENUM >+> incorporate into giix

Created 4 years ago by c@cbaHow-tos4 comments – viewed 34,456 times – ( +14 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a drop down list, which has the enum values as options. The main code was contributed by zaccaria in the forum (see this post).

How to use GridView with AJAX

Created 2 years ago by Antonio RamirezHow-tos6 comments – viewed 46,989 times – ( +14 ) – version 2.0
With the adoption of PJax on Yii2 things  have change quite a bit with GridView when it comes to work with them in AJAX mode. It will probably be confusing at the beginning, but then you will soon realize how powerful the new approach is.
tags: yii2, pjax, widget

Using Bootstrap with LESS

Created 3 years ago by Chris83How-tos1 comment – viewed 43,864 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.

Integrating HybridAuth directly into Yii without an extension

Created 3 years ago by biz devHow-tos8 comments – viewed 37,981 times – ( +14 ) – version 1.1
This article tries to explain the steps required in integrating the HybridAuth into Yii directly, without using an extension.

Kickstart development with Yii-App

Created 3 years ago by Chris83How-tos25 comments – viewed 30,553 times – ( +21 / -1 ) – version 1.1
I recently created a project called Yii-App on GitHub to kickstart my development of smaller Yii applications. The main goal of the project is to provide a ready-to-use application template that includes my bootstrap extension and many other useful extensions. After reading this article you will be able to use this project as a starting point for all of your Yii projects.

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Created 2 years ago by Kartik VHow-tos2 comments – viewed 28,418 times – ( +38 / -4 ) – version 2.0
In Yii 2.0, the yii widgets that use Twitter Bootstrap CSS & JS directly, are part of the yii2-bootstrap extension, starting with yii/bootstrap namespace. For customizing bootstrap extension specific widget assets, you could configure your own assets (CSS/JS) using the new Yii Asset Manager in your Yii Config file. Something like:

How to read HTML5 Multiple File Input from controller?

Created 2 years ago by Kartik VHow-tos1 comment – viewed 8,334 times – ( +37 / -4 ) – version all
Ok, so you have a HTML 5 file input markup on your view and you have enabled multiple attribute to true. You may also be using widgets based on HTML5 input like \kartik\widgets\FileInput. But when you read a file in Yii controller using CUploadedFile (Yii1) or UploadedFile (Yii2), you do not see a list of multiple files that you selected in your view, but only one row. Your HTML markup in your view would be something like this and you don't know why this is not working?

Using loginRequiredAjaxResponse to solve ajax session timeout

Created 4 years ago by RutgerHow-tos3 comments – viewed 25,899 times – ( +13 ) – version 1.1
This solution requires Yii 1.1.9 or above