Monday 13 September 2010 3:41:45 pm
If you use {"_pics/1.jpg" |ezimage}, then it's not static anymore. Static would be:
<?xml version="1.0" encoding="utf-8"?>
<photos>
<photo desc="Picture is from stock.xchng" url="/design/mysite/images/_pics/1.jpg" />
<photo desc="Picture is from stock.xchng" url="/design/mysite/images/_pics/2.jpg" />
</photos> If you want to use the ezimage operator, then you must use the dynamic way (ie. use a template). What you have to do is go to layout.ini and add the following
[photos]
PageLayout=pagelayout_photos.tpl
ContentType=text/xml Create a pagelayout_photos.tpl file in your template folder and put this in: <?xml version="1.0" encoding="utf-8"?>
<photos>
<photo desc="Picture is from stock.xchng" url={"_pics/1.jpg"|ezimage} />
<photo desc="Picture is from stock.xchng" url={"_pics/2.jpg"|ezimage} />
</photos>
And when you call your xml, use:
so.addVariable("xmlURL",{"layout/set/photos"|ezurl});
|