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

Render ViewableData on custom Controller


Go to End


882 Views

Avatar
zenmonkey

Community Member, 545 Posts

31 December 2012 at 8:18am

Edited: 31/12/2012 12:37pm

I'm trying to do an ajax request to a custom controller, but the renderWith keeps looking for the template on the Simple theme as opposed to current theme. Obviously it's using the one set _config, but doesn't that defeat the purpose of the selctable theme in the back end? Is this a feature or a bug?

Further more when calling something like:

$vd = new ViewableData();
	    return $vd->customise(array(
			"Title" => "MLS Search Results",
			"Query" => $communitySearch." priced between ".$min." and ".$max." with more than ".$bed." bedrooms and ".$bath." bathrooms.",
			"Results" => $set
	    ))->renderWith(array('MLSSearchPage','Page'));

I find the Page.ss tempalte portions don't render fully. I occaionally loose my custom Menu data in the Header.ss and I never get any of teh site data being pulled in Footer.ss