that's probably because <% control Children %> returns a couple of Page class DataObjects, not Page_Controllers, meaning you have no access to methods in the children's controller. You could overcome this by creating a similar kind of method in the Page class itself. Feels a bit funny maybe, but ...
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
- Previous 10 entries
- 1
- Page 22(current)
Thanks a lot, that helped.
I moved the function
public function getProductsList($num)
{
return $this->Products(Null, "Price,Title", Null, $num);
}
to the CategoryPage Class, so now it can be accessed from the ProjectsHolder template.
It works and I guess i shouldn't have problems with it set up like that...
Thanks man
- Previous 10 entries
- 1
- Page 22(current)