Jump to content

Ordering children by their parents


Tyssen
 Share

Recommended Posts

I have a series of products which are attached to 'collections' which are their parent pages. I need to be able to output the products by their parents order. At the moment I have this: 

$products = $pages->find("template=product,stock=1");

which worked fine when I first created the site because all the products were entered in the correct order, but now a new collection has been added that needs to go first. (Parent pages have a different template than the individual products.)

I've tried adding sort=sort but as mentioned in the docs it doesn't really produce the desired result.

So how would I go about it?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...