Forums / Developer / set priority value
Michele Franceschi
Saturday 24 January 2004 12:18:18 pm
I have to build a script that create content object with particular priority value. When and Where can I set priority value ????What php class does it (eZNodeAssignment or eZContentObjectTreeNode or ...)?
Eirik Alfstad Johansen
Sunday 25 January 2004 11:14:38 pm
Hi Michele,
I'm not sure, but I think it's the 'sort_field' parameter of the eZNodeAssignment::create method which controls this.
Sincerely,
Eirik Johansen
Sincerely, Eirik Alfstad Johansen http://www.netmaking.no/
Sunday 25 January 2004 11:54:32 pm
Hi Eirik,I use 'sort_field' parameter to select "Sort by" (Name, Published, Modified, Section, etc...)
Monday 26 January 2004 12:08:17 am
Then it's probably the 'sort_order' parameter.
Monday 26 January 2004 12:44:42 am
I use 'sort_order' parameter to select ascending o descending
Monday 26 January 2004 1:05:50 am
Then I guess my first answer was better: I'm not sure. :)
It might be just as easy to access the db and set the priority directly (unless you get a better suggestion, that is).
Monday 26 January 2004 1:09:37 am
Hi again,
I just took a look at the kernel code for updating priorities, and noticed that they are in fact set directly (no designated class method). Here's how it's done:
$db->query( "UPDATE ezcontentobject_tree SET priority=$priority WHERE node_id=$nodeID" );
Monday 26 January 2004 9:42:14 am
Thanks Eirik,I followed your tip