Answer the question
In order to leave comments, you need to log in
How to substitute html code through php?
The bottom line is that on the site (Bitrix) you need to add icons from the Font Awesome library to the menu, but I did not find where to edit this menu in the template, and I thought that it would be possible to add these icons by substituting them by editing the main template (where counter codes are inserted) how can this be done? I don’t know php at all, but it seems to me that if I make a code that generates the html elements I need and substitutes them, then everything should be normal.
How to implement all this?
Answer the question
In order to leave comments, you need to log in
You need to fix the menu component template.
If the icons need to be displayed not all the same for each item, but individual ones, then you should use the menu options in the advanced mode.
An example of how this is done (albeit on a template based on bootstrap 2, but this is not important) is shown here http://xn--80ahcjeib4ac4d.xn--p1ai/information/int...
echo "<p>Ваш HTML-код</p>";
The rest depends on the conditions you need.
Try like this:
Array(
"<i class='fa fa-address-book' aria-hidden='true'></i>Контакты",
"/contacts/",
Array(),
Array(),
""
)
Is it really possible to substitute the icon code in front of each of this list, through php?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question