@josh has joined the channel
Your approach is cleaner though.
Yeah cool, I just tried this and it worked fine:
- public function index()
- // Get 9 random projects
- $projects = ;
- $projects_datalist = $this->getRandomProjects(9);
- foreach ($projects_datalist as $project)
- $projects = $project;
- return array(
- 'projects' => new ArrayList($projects)
Right, can you show me how to do that?
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.
SS docs, one sec I’ll post the link.
No, but still the same outcome after a
?flush. Yeah I come from other frameworks, so perhaps I’m missing something obvious SilverStripe specific!
Still the same outcome.
Giving it a whirl now 🙂