Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

renderwith() help

Go to End

6 Posts   1995 Views


Community Member, 38 Posts

15 September 2009 at 5:13pm

How can i send my $xURL value to the template in this function????

ie this is what i have but dosnt work. I was using $ParamsXML.xURL in the template.

function ParamsXML() {
	$xURL = "test";
    	return $this->customise($xURL)->renderWith("slideshowProParamsXML");


Forum Moderator, 5523 Posts

15 September 2009 at 5:24pm

You pass $this->customise an ArrayData object with the values.

return $this->customise(new ArrayData(array('xURL' => $xURL))->renderWith('slideshowProParamsXML');


Community Member, 38 Posts

16 September 2009 at 3:15pm

omg thank you, i must have tried a million variations but not that one!

One more thing!

Is there a way i can append .xml on the end of the url??

At the moment that function creates an xml file at this location;

but i want it to read;

Im not 100% sure but i think ie6 wont load my xml file into flash unless it has the .xml on the end (tested with a static xml file)


Forum Moderator, 5523 Posts

16 September 2009 at 3:23pm

Should work fine without the xml extension. I use this method for all our flash / xml integration work and as long as you have the correct template encoding for the template (and it needs to be at the root of the templates folder - not in layout) then it should work perfectly.


Community Member, 38 Posts

16 September 2009 at 4:00pm

could you elaborate on the template encoding?


It used to work with a previous flash banner view but now we have purchased Slide Show Pro and it only works in Firefox, so strange.

Only Two templates used, and

this is what looks like

<?xml version="1.0" encoding="UTF-8"?>
    <album id="ApartmentImages" title="Album One" description="Description of Album One">
    	<% control Images %>
        <img src="<% control Image %><% control CroppedImage(700, 389) %>$URL<% end_control %><% end_control %>" title="$Name" />
        <% end_control %>

This is the flash error i get in ie6

Error: Error #1096: XML parser failure: Unterminated element.
	at Error$/throwError()
	at flash.xml::XMLDocument/parseXML()


Community Member, 38 Posts

16 September 2009 at 4:41pm


It seems AS3 is alot more strict on reading xml files.

I had

<img src="image.jpg" />

however AS3 didnt like the self closing img tag so i tried

<img src="image.jpg"></img>

And that has seemed to resolve it. Still no idea why it was working in Firefox all this time though!