The Smarty template engine is used, the svg.tpl file is connected to index.tpl. An example of it:

<svg xmlns="http://www.w3.org/2000/svg" > <symbol id="chevron-left" viewBox="0 0 24 24" > <path fill="black" d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/> <path d="M0 0h24v24H0z" fill="none"/> </symbol> </svg> 

Then through use the icon is connected:

 <svg class="icon" width="18" height="18" fill="#cccccc"> <use xlink:href="#chevron-left" /> </svg> 

The problem is that icons are displayed on the main page, but they are not visible on all other pages, there is a svg sprite in the code, but use does not work

  • Is a website available? Need to take a look. And which doctype is specified? - olegatro
  • Now only on LAN. <! DOCTYPE html> - Sergey Miroshnik
  • I myself use this method, but I have not had such problems. I did not edit the smarty for a long time. - olegatro
  • Do you think this may be due to the template engine? - Sergey Miroshnik
  • Can I link to some site working where sprites are used? - Sergey Miroshnik

0