Mail template image url

Permalink
Hello all,

I am using the custom form fromhttps://github.com/jordanlev/c5_custom_contact_form.... I want to make a HTML email template. In the mail folder I created a template user_notify.php. From there I wanted to define the url to the images folder in the theme folder.

<img src="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . View::getInstance()->getThemePath();?>"/img/img-name.jpg>


return value =http://localhost:8888/img/img-name.jpg...
needed value =http://localhost:8888/maastrichtZuid/themes/maastrichtZuyd/img/img-...

I tried to insert the theme name but that did not work View::getThemePath()->getThemeHandle();

How can I get the full url of the site to the image folder in the theme?

Thanks.

 
Jupiter replied on at Permalink Best Answer Reply
Jupiter
if your image in theme folder then you have to put image src like below..

<img src="<?php echo BASE_URL.DIR_REL ;?>/themes/test_theme/images/ajax-loader.gif">

please replace folder names as img and give your image name in proper place and also change the theme name
hope this helps
rge replied on at Permalink Reply
sorry for the late response. Thank you very much :).
Jupiter replied on at Permalink Reply
Jupiter
Thanks