S
S
Sergey Goryachev2017-07-25 19:25:39
PHP
Sergey Goryachev, 2017-07-25 19:25:39

php styling when laying out jade/pug?

Actually, the situation is this.
Typesetting I mean under the control system immediately. Converted from jade/pug file to php.
But you also need to somehow arrange php. Output of various information, blocks and so on.
How is it done correctly? And in general, is this approach Feng Shui?
In fairness, I note that I have a functions.php file in the root of the template, where I can take out php.
For example, I need to make a selection of the active menu item, I think to add the .active class in php.
How it is correct to register it in jade?
I hope I explained more or less clearly)))
I will add that the menu does not have any control from the admin panel.
A simple menu of several items, static.

nav.mainmenu#mainmenu
    .wrapper.wrapper--mainmenu
        ul.mainmenu__list
            li.mainmenu__item
                a.mainmenu__link(href="/") Главная
            li.mainmenu__item
                a.mainmenu__link(href="/contact") Контакты

The question is, first of all, how correct is this.
And then, is it possible and how to do it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Goryachev, 2017-08-05
@webirus

|<?php ... ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question