Forums / Developer / image full path in xml text
ludo thomas
Thursday 07 July 2005 1:39:23 am
hi,
I try to show the content of a xml text in an email. in this xmltext, I want to put images. for display the content, i say:<b>{$node.object.data_map.corps.content.output.output_text}</b>
problem is that image path is like: <b><img src="/var/..."></b> I need the full path with http://www.DOMAIN.com/var..do sombody know how?
Thursday 07 July 2005 2:10:56 am
I have the solution:
I use ereg_replace function in my workflow:
$mailTemplateResult=ereg_replace("/var","http://www.DOMAIN.com/var",$mailTemplateResult);
Ćukasz Serwatka
Thursday 07 July 2005 2:14:18 am
Hi,
You can get SiteURL from INI file, and full path of image with code below, and use it as paramters of concat function.
I didn`t test it ...
{def $site_url=ezini( 'SiteSettings', 'SiteURL', 'site.ini' ) $img_url=$node.data_map.corps.content[original].url|ezroot} <img src={concat( $site_url, $img_url )} />
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog