A
A
Adex2017-08-09 16:37:45
Pug
Adex, 2017-08-09 16:37:45

How to write a loop/mixin for nested lists in Pug?

Greetings. When writing a menu with nested lists like

<ul>
  <li>1
     <ul>
        <li>2
            <ul>
                <li>3</li>
            </ul>
        </li>
     </ul>
  </li>
</ul>

I decided to use a mixin / cycle, but I did not find a solution that allows me to implement this. How can nested lists be pushed into higher level lists?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2017-08-09
@Adex

How to write a mixin for Jade/Pug?
https://pugjs.org/language/mixins.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question