L
L
lavezzi12016-03-11 13:39:37
Pug
lavezzi1, 2016-03-11 13:39:37

How to do this in jade?

Hello.
There is a block that describes the structure and it is included on the main page several times.
You need to put another block inside the include in the form of a mixin.
Main page:

.page__block
            include ../modules/promo-block/promo-block
              include ../modules/preview/preview
              +preview('Название', 'Дата')

The problem is that this mixin gets into promo-block elements. How can I determine where this mixin should be inserted? For example, in a certain element of the promo-block block

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Erokhin, 2016-03-11
@lavezzi1

As far as I understand, this block
should include this mix
. Since the block now depends on the parameters ('Name', 'Date'), I would also make it a mix that accepts these parameters. You can also put it in a separate file and connect it where necessary.

E
evilelf, 2016-03-11
@evilelf

In the promo-block.jade file, you need to specify +preview('Name', 'Date').
But you need to include the mixin higher.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question