SVG logo

  • I’m trying to achieve next thing:
    <img class=“logo img-responsive” src="{$img_dir}logo.svg" alt="{l s=‘Logo’}" onerror=“this.src=’{$img_dir}logo.png’” width=“143” height=“123”>
    It is discussed in ps forums where I found the code. Unfortunately the theme I’m trying out is using other code structure and I can’t find the file with that code. I found php file which I believe the code should be placed in but I don’t know where exactly to put it. So any help will be appreciated.
    Here is the php file from the theme:0_1504778067212_addonlogo.php

  • So you want to use a .svg image instead of a regular .jpg etc.?
    Where do you want to place it?
    On Top of your Theme or is it a Module which you want to put it in?

  • Yes, I would like to use svg logo and in case browser doesn’t support it then jpg. Unfortunately the template I bought uses pagebuilder module and I can’t find where exactly I have to place the code.

  • Did you find the File where you can Place your code in the meantime?

  • It is the one attached in the first message I think. Meanwhile I’m experimenting with the payment module (payment icons in the footer) and it is working. But the code there is in the tpl file not php like the logo in my case… I believe it is easy job for someone who knows php.

  • Is the image always in the same place? Maybe you can just take the direct path, e.g. /img/logo.svg

  • Though $base_dir should give you the base location, which you can use to prefix the path, e.g.: {$base_dir|escape:'htmlall':'UTF-8'}/img/logo.svg

  • … works… please delete my post. I had a typo and asked for help. working is now:

    <img class="logo img-responsive replace-2xlogo" src="{$base_dir|escape:'htmlall':'UTF-8'}img/svg/logo.svg" onerror="this.src='{$base_dir|escape:'htmlall':'UTF-8'}logogs.jpg />


Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.