josh

Yeah cool, I just tried this and it worked fine:

  1. public function index()
  2. {
  3. // Get 9 random projects
  4. $projects = [];
  5. $projects_datalist = $this->getRandomProjects(9);
  6.  
  7. foreach ($projects_datalist as $project)
  8. {
  9. $projects[] = $project;
  10. }
  11.  
  12. return array(
  13. 'projects' => new ArrayList($projects)
  14. );
  15. }
josh

Right, can you show me how to do that?

josh

Yeah that’s what I thought might’ve been happening. Oh well, thanks for your help, I’ll have a go at getting around that.

josh

SS docs, one sec I’ll post the link.

josh

No, but still the same outcome after a ?flush. Yeah I come from other frameworks, so perhaps I’m missing something obvious SilverStripe specific!