I have a page where I am combining the Content from a few child pages by getting a dataobjectset of the pages and then using a foreach loop to concatenate the Content data. To format the Content area I call renderWith() on each page using a custom template for just the content and add that to the Content of the Actual page I am on. I have some logic I want to run to change add some stuff to each page content before it is rendered so I tried
$child->customise(array('foo' => $bar))->renderwith('customtemplate');
Where $child is the Page dataobject. However this doesn't work and I suspect it is because customise() is usually called from within a page's controller and refers to $this.
So the basic question is can a dataobject be customised and then rendered with a template? Seems like I have done this before but not in SS 2.4.5.