Collection(active dataprovider),layout

I don’t Understand:


[*]The difference between using collection(with active data provider) and not using it

[*]The difference of a block and a nested layout


A data provider (e.g. ActiveDataProvider) is not a collection of data, but is a provider of it.

Usually it is used by a widget (d.g. GridView and ListView) that supports pagination and sorting.

The following wiki article was written for Yii 1.1, but I hope you will find it useful since the basic design is not changed for Yii 2.0.