A
A
Ankozar2021-04-28 13:33:58
Pug
Ankozar, 2021-04-28 13:33:58

How to automatically put bam modifiers in pug during build, depending on the page being built?

There is a page. It includes a block. The same block is included on the second page. I want so that I don't have to create two different files of the same block, and somehow pug put different modifiers on the same block on different pages.

Conditionally: on one page becomes on another:

<div class='block'>


<div class='block block_mobile'>


<div class='block block_desktop'>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zlobarchic, 2021-05-13
@Zlobarchic

I think a mixin would be perfect for this instead of an include.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question