Wiki articles in category Tips

Showing 121-140 of 162 items.

embedded javascript block in your view with IDE checking or intellisense

Created 9 years ago by yiqing95, updated 9 years ago by yiqing95.

this is my way for embed js code block in view file:

2 0
3 followers
Viewed: 13 024 times
Version: 2.0
Category: Tips

Create Form With DynamicModel

Created 9 years ago by Misbahul D Munir, updated 9 years ago by Misbahul D Munir.

In yii2 we can create form without create FormModel. Here we go

4 0
8 followers
Viewed: 47 053 times
Version: 2.0
Category: Tips
Tags: form, model, yii2

Add model validator in Controller

Created 9 years ago by Kostas Apazidis (KonApaz), updated 9 years ago by Kostas Apazidis (KonApaz).

There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way

1 1
3 followers
Viewed: 30 790 times
Version: 1.1
Category: Tips

Step by step for how to full export Yii2 grid to excel

Created 9 years ago by Scott_Huang, updated 9 years ago by Scott_Huang.

We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:

1 0
5 followers
Viewed: 74 427 times
Version: 2.0
Category: Tips

Easy way to redirect http:\\localhost\yii2-basic to http:\\localhost\yii2-basic\web\index.php

Created 9 years ago by Scott_Huang, updated 9 years ago by Scott_Huang.

First of all, install yii2 basic template according below link:

1 0
5 followers
Viewed: 70 233 times
Version: 2.0
Category: Tips

Provide SVG when the browser supports it, else PNG (using CHtml::image overload)

Created 9 years ago by le_top, updated 9 years ago by le_top.

Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback.

1 0
1 follower
Viewed: 9 946 times
Version: 1.1
Category: Tips

Analyse the server's USER-AGENT against browsecap file to determine it's capability.

Created 9 years ago by Deepak Pradhan, updated 9 years ago by Deepak Pradhan.

Does your application need to know user's details on browser details, os and device type? We can use PHP's misc. function to achieve that provided you have an update copy of browsercap.ini

0 0
0 follower
Viewed: 9 086 times
Version: 2.0
Category: Tips

Yii Rights Management Tips

Created 9 years ago by Rajith R, updated 9 years ago by Rajith R.

yii rights some tips..

2 0
4 followers
Viewed: 13 182 times
Version: 1.1
Category: Tips

Customizing the CMenu Widget

Created 10 years ago by mistryb, updated 9 years ago by mistryb.

The CMenu class provides some useful features for generating menus in your web application.

1 0
4 followers
Viewed: 67 774 times
Version: 1.1
Category: Tips

Useful Multilanguage extensions collection and use.

Created 10 years ago by cihappy, updated 9 years ago by Rohit Suthar.

What I want to achieve:

2 0
3 followers
Viewed: 9 897 times
Version: 1.1
Category: Tips

Yii 2 list of path aliases available with default basic and advanced app.

Created 9 years ago by Kartik V, updated 9 years ago by Kartik V.

If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

14 4
46 followers
Viewed: 180 496 times
Version: 2.0
Category: Tips

Using counters with ActiveRecord

Created 12 years ago by davi_alexandre, updated 9 years ago by marcovtwout.

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).

11 1
17 followers
Viewed: 44 518 times
Version: 1.1
Category: Tips

YII2 Pagination Options

Created 9 years ago by VivekYii, updated 9 years ago by VivekYii.

solution here If we are using default pagination option like

1 0
1 follower
Viewed: 18 250 times
Version: 2.0
Category: Tips

New Relic Error Alert with Yii

Created 10 years ago by simon604, updated 9 years ago by razvanphp.

Introduction

2 0
4 followers
Viewed: 20 577 times
Version: 1.1
Category: Tips

Selecting best language based on Browser language and available languages.

Created 9 years ago by le_top, updated 9 years ago by le_top.

Your application is international and you have to select the best language for the user. Your user may have selected 'fr_CA' and you have 'fr_FR' or 'fr' available. What do you do? Here is a tip.

2 0
1 follower
Viewed: 15 415 times
Version: 1.1
Category: Tips

Debuging variables in Yii2

Created 9 years ago by johonunu, updated 9 years ago by johonunu.

This tutorial is explained following "basic" application structure.

4 1
8 followers
Viewed: 41 780 times
Version: 2.0
Category: Tips

Using PayPal IPN with Yii2

Created 9 years ago by darioo, updated 9 years ago by darioo.

I'm using PayPal's script from

0 0
1 follower
Viewed: 12 970 times
Version: 2.0
Category: Tips

Things to Consider when application hosting on AppFog

Created 9 years ago by VINAY Kr. SHARMA, updated 9 years ago by VINAY Kr. SHARMA.

I faced many issues when hosted our company website on AppFog.

1 0
1 follower
Viewed: 7 914 times
Version: 1.1
Category: Tips

Customize your Growl/Alert msg easy and quickly

Created 8 years ago by Scott_Huang, updated 8 years ago by Scott_Huang.

I leverage Kartik's notification widgets.

0 1
2 followers
Viewed: 15 833 times
Version: 2.0
Category: Tips

Building a search GET request with scenarios ; calling a SearchModel from URLs...

Created 8 years ago by Louis Gac, updated 8 years ago by Louis Gac.

Search Models are a very elegant and powerful way to build an Active Data Provider. If you use them a lot, you'll quickly need to use scenarios, which will lead you to a very DRY Controller code.

0 0
2 followers
Viewed: 22 251 times
Version: 2.0
Category: Tips