Answer the question
In order to leave comments, you need to log in
How to create variables in html using gulp?
Guys, can you tell me if it is possible to create variables in html files using gulp?
That is: let's say I'm building a multi-page site and I want the corresponding menu link to be active when I'm on a certain page.
In php, it would look like this:
<a href="" class="<? if (activePage = "about") { ?> active <? } ?>">About the company</a>
And on the corresponding page, I would set variable value: <? $activePage = "about" ?>
And as a result, the "About" link would be active.
That is, you need the ability to create and check variables, I don’t know how else to explain it))
Is it possible to do the same with php using gulp, but in files with html extension? Maybe there is a plugin? Thanks in advance.
Answer the question
In order to leave comments, you need to log in
For start = is an assignment, with <? there is no conclusion. You need js and location
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question