Showing 121-140 of 166 items.

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

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 2 comments

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
Viewed: 91 453 times
Version: 2.0
Category: Tutorials

Save and Display Date/Time Fields in different formats in Yii2

Created 12 years ago by Kartik V Kartik V, updated 11 years ago by Kartik V Kartik V. 12 comments

You would find having such a need in most Yii Projects. Your database needs a specific format to store date fields, while you may want to display it in different formats to the users on forms and other views.

0 0
51
Viewed: 185 923 times
Version: 2.0
Category: How-tos

Managing your nested dropdown dependency with DepDrop widget

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 6 comments

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
Viewed: 102 058 times
Version: 2.0
Category: Tutorials

Using your own forked version of extensions with composer

Created 12 years ago by Kartik V Kartik V, updated 11 years ago by Kartik V Kartik V. 4 comments

So you want to use a fork of any existing vendor extension with your Yii 2 install and use the fork, instead of original source. This does not need you to push any update or register your package on packagist.org. You are recommended to follow the approach below:

3 2
40
Viewed: 27 986 times
Version: 2.0
Category: Tutorials

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

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 0 comments

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
Viewed: 49 348 times
Version: 2.0
Category: Tips

Locking your Yii 2 project package versions with composer.lock

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 0 comments

Ok, you have installed a Yii 2 basic or advanced app for the first time and completed the post install steps. You have picked up a few extensions to install for the first time as well. You would already see a composer.lock file in your application root folder.

0 2
37
Viewed: 21 816 times
Version: 2.0
Category: Tips

FORM with GET method causes repeated stacking of URL Parameters

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by toph toph. 3 comments

// In Yii 1.x $form = $this->beginWidget('CActiveForm', [

'id' => 'order-search-form',
'method' => 'get',

]); echo $form->textInput($searchModel, 'id'); echo CHtml::submitButton('Find', ['class' => 'btn btn-primary']); $this->endWidget(); `

7 2
41
Viewed: 68 738 times
Version: all
Category: Tips

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

Created 12 years ago by Kartik V Kartik V, updated 11 years ago by Kartik V Kartik V. 4 comments

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.

15 4
45
Viewed: 192 319 times
Version: 2.0
Category: Tips

Overcoming removal of client helpers (e.g. ajaxLink) and ClientScript in Yii 2.0

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 2 comments

Alternatively, inline assets (JS/CSS) can be registered at runtime from within the View. For example you can clearly simulate the ajaxLink feature using a inline javascript. Its however recommended if you can merge where possible, client code (JS/CSS) into separate JS/CSS files and loaded through the AssetBundle. Note there is no more need of a CClientScript anymore:

1 2
41
Viewed: 49 084 times
Version: 2.0
Category: FAQs