Wiki articles

Showing 41-60 of 164 items.

How to store array/widget configuration to the database with config validation rules

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

Note the tag {{homeUrl}} will be dynamically replaced at runtime.

2 3
41 followers
Viewed: 23 490 times
Version: 2.0
Category: Tutorials

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

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

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?

2 3
39 followers
Viewed: 43 154 times
Version: 2.0
Category: Tips

Managing your nested dropdown dependency with DepDrop widget

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

If you are coming over to Yii 2 from Yii 1.x, you may have already read this useful wiki for creating dependent dropdowns. You can use a similar approach in Yii 2 to do the same. But if you are looking at a prebuilt solution that helps you manage it easier, read along.

2 3
42 followers
Viewed: 87 340 times
Version: 2.0
Category: Tutorials

Displaying uploaded file from DB for update with FileInput widget

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

This is for folks who are using \kartik\widgets\FileInput to upload files from your client. How do you display an image for update after you have uploaded it to the server using the widget?

2 3
43 followers
Viewed: 61 533 times
Version: 2.0
Category: How-tos

Activating Bootstrap 3 Tooltips & Popover for your Yii Site.

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

Step 1: Initialize the Bootstrap Tooltip & Popover plugins in your view layout file @web\views\layouts\main.php. Add this to somewhere in the beginning head section (after you have loaded the Jquery using your AppAsset or something similar).

3 3
48 followers
Viewed: 65 417 times
Version: 2.0
Category: Tips

GridView show sum of columns in footer.

Created a year ago by shiv.

GridView show sum of columns in footer `PHP use yii\grid\DataColumn;

1 0
1 follower
Viewed: 67 214 times
Version: 2.0
Category: Tips

How to add a DropDown Language Picker (i18n) to the Menu

Created 3 months ago by JQL, updated 3 months ago by JQL.

Yii comes with internationalisation (i18n) "out of the box". There are instructions in the manual as to how to configure Yii to use i18n, but little information all in one place on how to fully integrate it into the bootstrap menu. This document attempts to remedy that.

1 0
1 follower
Viewed: 54 053 times
Version: 2.0
Category: How-tos

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 231 times
Version: 2.0
Category: Tips

`forceCopy` per Asset Bundle

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

During development and depending on your setup you may need to use the options forceCopy or linkAssets of the asset manager to work around possible file-system and permission issues.

1 0
1 follower
Viewed: 12 790 times
Version: 2.0
Category: How-tos

YII2 : simple language Switcher Widget

Created 8 years ago by phunsanit, updated 8 years ago by phunsanit.
  1. create file common\components\languageSwitcher.php
1 0
5 followers
Viewed: 30 728 times
Version: 2.0
Category: Tutorials

Load data from internal/external source to fill form fields

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

This wiki is to show you how to use jQuery get and JSON to get data from a dropdown/any form field and fill form fields with the values instantaneously. First, I'll give example use cases of what I'm going to teach you so you can quickly see if this is for you.

1 0
5 followers
Viewed: 34 352 times
Version: 2.0
Category: How-tos

Load & Save With Relation

Created 8 years ago by moo.tensai, updated 8 years ago by moo.tensai.

Use this extension : yii2-relation-trait

1 0
2 followers
Viewed: 17 659 times
Version: 2.0
Category: Tips

PHP built-in server integration

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

I was playing around with another PHP framework which I didn't really liked anyway but it had simple and nice integration for PHP built in web server so I decided to write one for Yii (since this is my primary PHP framework)

1 0
3 followers
Viewed: 50 895 times
Version: 2.0
Category: How-tos

Tunneling using SSH in a limited enviroment

Created 10 years ago by nineinchnick, updated 9 years ago by CeBe.

This tutorial describes how to connect to a remote service via tunnel when only most basic software is available on the remote server. It is not directly related to Yii. It could be hovewer useful for web developers working with shared hosting sites with limited access.

1 0
3 followers
Viewed: 18 656 times
Version: all
Category: Others

How to make bootstrap tabs remain active/selected after navigating to different web pages.

Created 7 years ago by emrald, updated 7 years ago by emrald.

Bootstrap tabs gets unselected/inactive when user navigates to other page and comes back. How to make bootstrap tabs remain active/selected after navigating to different web pages.

1 0
3 followers
Viewed: 16 671 times
Version: 2.0
Category: Tutorials

How to make UrlManager createAbsoluteUrl work with sub-domains

Created 6 years ago by Wade Shuler, updated 5 years ago by CeBe.

Upon creating my Yii2 Members System, I have ran into a few snags along the way that forced me to extend and bend Yii2 to my will.

1 0
3 followers
Viewed: 36 058 times
Version: 2.0
Category: How-tos

Auto-update denormalized attributes with MongoDb and Yii2

Created 10 years ago by edoardo849, updated 9 years ago by CeBe.

You have different collections in MongoDb with de-normalized attributes. As you may know, due to its not-join nature, MongoDb tends to encourage repetition of the same value in different collections (de-normalization). In this MongoDb is opposed to a more SQL-like approach where you usually reference only the ID of the value with a foreign key.

1 0
3 followers
Viewed: 17 534 times
Version: 2.0
Category: Tips

Editing, Deleting, and Viewing model data with the yii2-detail-view extension

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

The yii2-detail-view extension offers you an easy way to EDIT and VIEW your model data, toggle these modes, and adds other features. You can read the extension documentation and/or view a demo of this extension, to understand usage.

1 0
43 followers
Viewed: 82 805 times
Version: 2.0
Category: Tutorials

Using the yii2-datecontrol extension along with yii2-detail-view widget

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

The yii2-datecontrol extension allows you to control separate date formats for display and saving for form inputs.

1 0
37 followers
Viewed: 20 860 times
Version: 2.0
Category: How-tos

using 'whenClient' for complex client side validation

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

You have a 'Category' model with Id, Name and Visibility (boolean, where 0 = Public, and 1 = Private).

1 0
3 followers
Viewed: 24 957 times
Version: 2.0
Category: How-tos