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.

Data Model Questions

Sort products


Reply

10 Posts   2265 Views

Avatar
martimiz

6 May 2011 at 7:12am Forum Moderator, 1091 Posts

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 ...

Avatar
liece

6 May 2011 at 10:15am Community Member, 9 Posts

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