S
S
Stanislav2017-02-03 10:13:12
PHP
Stanislav, 2017-02-03 10:13:12

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

5 answer(s)
L
lexnekr, 2017-02-03
@lexnekr

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...

I
Ivan Sushkov, 2017-02-03
@jamesgoodwin

echo "<p>Ваш HTML-код</p>";
The rest depends on the conditions you need.

A
Andrew, 2017-02-03
@AndrewHaze

Try like this:

Array(
"<i class='fa fa-address-book' aria-hidden='true'></i>Контакты",
"/contacts/",
Array(),
Array(),
""
)

S
Stanislav, 2017-02-03
@MegaPussyDestroyer_3000

64e4db1cf17a4a4dbc5a023b3f8fcbca.png
Is it really possible to substitute the icon code in front of each of this list, through php?

A
Ankhena, 2017-02-03
@Ankhena

And they can be added by editing only CSS , without climbing into PHP
or

.store-horizontal li:nth-child(нужный номер) a:after {тут стиль}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question