Articles in category "tips", sorted by date (updated)X
Displaying 1-10 of 135 result(s).

Expert's model generation with Gii

Updated 3 days ago by le_topTips0 comments – viewed 773 times – ( +1 ) – version 1.1
Efficient coding with Yii implies efficient use of the code generator. This article shares the personalised Gii templates that were built starting from the standard templates proposed by AweGen.

Search scenario (CGridView, etc.): avoid default values from database as search condition.

Updated 4 days ago by le_topTips1 comment – viewed 511 times – ( +1 ) – version 1.1
Yii has a neat "trick" that will assign default values to new CActiveRecords. When performing a search() though, this is pretty annoying as they automatically apply as filter values.

Activating Bootstrap 3 Tooltips & Popover for your Yii Site.

Updated 8 days ago by Kartik VTips3 comments – viewed 2,109 times – ( +24 / -4 ) – version 2.0
With Bootstrap 3 and its inbuilt support in Yii Framework 2.0, you would see quite some new ways of creating HTML markup and styling your site. However, with version 3 of Bootstrap, tooltips and popover are not activated by default on your elements. Assuming you have activated the Bootstrap 3 tooltip plugin - how do you easily enable display of tooltips/popovers across your site?

View a related field in CGridView

Updated 26 days ago by Rafael J TorresTips1 comment – viewed 1,020 times – ( +3 ) – version 1.1
Generally we need to show one or more fields from a model that is related to another model used in CGridView. For our case we will use two related models, which explain how to use model "A" fields in a CGridView that used model "B".

Key web server settings after installing a fresh Yii 2 basic or advanced app

Updated about a month ago by Kartik VTips0 comments – viewed 1,292 times – ( +26 ) – version 2.0
So, you have installed a brand new Yii 2 app (basic) or (advanced). Here are a few tips for Apache web server users to get things running more secure and better with your yii2 app.

Model validation for field ranges using yii2-field-range extension

Updated about a month ago by Kartik VTips0 comments – viewed 997 times – ( +26 ) – version 2.0
The yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.

Make an ajax request to another server using JSONP

Updated 2 months ago by KonApazTips0 comments – viewed 1,182 times – ( +1 ) – version 1.1
There are cases that you want to make an ajax request to another server and get the results.

Create URL to language switcher anchor with langhandler

Updated 2 months ago by Anas AbuDayahTips2 comments – viewed 960 times – ( +1 / -1 ) – version 1.1
This topic is related with langhandler extension

How to change the confirmation message on admingridview button and call a ajax..Dynamic

Updated 2 months ago by yiimTips0 comments – viewed 6,678 times – ( +3 ) – version 1.1
Hi Friends,

Install specific Yii2 vendor extension & dependency without updating other packages.

Updated 2 months ago by Kartik VTips0 comments – viewed 977 times – ( +27 / -5 ) – version 2.0
The tips here are for advanced usages of composer and its assumed you have read about using composer and have a knowledge of your vendor packages to be updated. Let's consider, you want to update only one specific yii2 vendor library, without updating all the other extension packages?