Jump to content

[solved] How to set children sort by field from API


Recommended Posts

I started to write this post and at the same time figured out the answer from source. Decided to post my problem, since this is something that is currently missing from cheatsheet (not sure if everything should be there).

I create page from API and I need to set that it children get sorted by custom field called candidate_number. How to set that from API?

This is how:

$p->sortfield = $fields->get('v_candidate_number');
  • Like 1
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

  • Create New...