N
N
nepster-web2014-04-10 02:20:24
Yii
nepster-web, 2014-04-10 02:20:24

Yii2 in which cases to use pagination, and in which GridView?

Please tell me such a moment, for example, we have a Blog module (we will be responsible for the articles on the site).
Backend:
- all blog posts
- edit post
- create post
- delete post
Frontend:
- all blog posts
- post view
So, on the Backend side, I used a gridview to display all the posts in the table. On the Frontend, everything is a little more complicated, there is html5 layout, which makes this whole thing more complicated than a simple table, so I think in this situation to use foreach with the pagination widget. Will it be right?
In a simplified way, my question is: in which cases to use pagination, and in which GridView ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-04-10
@nepster-web

In Yii2, twig is the default... and you are talking about templates in php, apparently...
In any case - CGridView - for tables (for example, a simple admin panel), pagination is still used there. You can use any list view as you like.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question