A
A
agent11562017-01-24 13:46:53
Yii
agent1156, 2017-01-24 13:46:53

How do I set up a database output by category so _-> Category 1 (1 entry) followed by Category 2 (2 entries)?

I have a news feed on my site. agent1156.myjino.ru
I need to set up the output of articles in such a way that first there was a wide block with category 1 and then 2 small blocks with category 2, then the words wide and two small.
The difficulty is that if in the admin panel they enter in a row news from the categories of a wide block, anyway, the news should alternate 1 wide 2 small ones))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-01-24
@agent1156

Yii has nothing to do with it, such things are decided at the layout level, usually they use the mansory library for this.
masonry.desandro.com/layout.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question