Answer the question
In order to leave comments, you need to log in
How to create a mixin in pug to display products of the same type?
Hello, I switched to jade. There was a need to use its ability to create mixins or mb functions, I don’t know exactly what the name is. So here's the thing, as I know, you can create "this" and then call it only by specifying other data as in a function. I'll show an example on the screen
Here there are several blocks, they differ only in the image, price and quantity. You can create a mixin and simply call it each time with the parameters you need. I hope you understand what I mean.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question