Showing 61-80 of 86 items.

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 358 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 834 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 782 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 350 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 108 times
Version: 2.0
Category: FAQs

What to do when composer fails to update your vendor packages?

Created 12 years ago by Kartik V Kartik V, updated 12 years ago by Kartik V Kartik V. 0 comments
  • Running a composer update does not fetch any new packages (even though the source is updated)
  • A specific vendor package never gets updated
  • Facing on and off problems when fetching packages while performing composer update.
  • You ran a composer update earlier, but it was partially done, before you lost network connectivity, and you cannot refresh packages anymore.
0 4
36
Viewed: 57 091 times
Version: 2.0
Category: Tutorials

How to use GridView with AJAX

Created 12 years ago by Antonio Ramirez Antonio Ramirez, updated 8 years ago by CeBe CeBe. 6 comments

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.

10 0
15
Viewed: 94 957 times
Version: 2.0
Category: How-tos