A
A
Artur2017-10-10 11:23:58
Yii
Artur, 2017-10-10 11:23:58

How to organize the landing page admin logic in yii2?

What is the best way to implement the admin part of the landing page. The point is.
Information must be stored in blocks in a table. Those. one block is the section /section tag
In the admin panel, it should be possible to create such blocks based on templates and edit them (title, text, pictures), place them on the page in any order, ... it is possible to add pages and place these blocks on them
also, it should be possible to sort these blocks on the page.
How to build such logic?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Fedorov, 2017-10-10
@qonand

1. Think over the structure of the blocks, i.e. make a list of parameters common to all blocks
2. Make a circle of these blocks...

M
Maxim Kozhin, 2017-10-10
@maximkozhin

It is possible with yii2 widgets
Each block can correspond to its own widget, which will load its assets and other files. You can use several blocks of the same type.
Next, you can make a simple widget factory that will be associated with WidgetStorage (for example, storage in a database)

A
afi13, 2017-10-10
@afi13

You need to define block entities with the fields you need (title, text, pictures). And add a one-to-many connection to these blocks to the essence of the page so that you can add them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question