Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
TeamSite::DCRnode Sorting
cc96ai
|--- A
|--- B
|-- C
|-- C
$root->set_node_list( sort inOrder $root->get_node_list("B") );
I success to sort <B> element
however, if i try to save it back to file
the <A> is missing.
do we have any way to solve this problem ?
Find more posts tagged with
Comments
cc96ai
forgot to mention
i use TeamSite:
CRnode
Adam Stoller
I'm not sure what your "diagram" was attempting to show.
What is the relationship between A & B, B & C, etc? Are they "siblings"? "parent/child/granchild"?
$root->set_node_list( sort inOrder $root->get_node_list("B") );
The above would seem to take the node list of B, sort it, and stuff it into the root of the node list - which I would think explains why A is missing.
Perhaps you want $root->get_node_list("A") ? or maybe:
$root->set_node_list($root->get_node_list("A"), sort inOrder $root->get_node_list("B")); or maybe
$root->set_node_list(sort inOrder ($root->get_node_list("A"), $root->get_node_list("B")));
It's kind of hard to tell at this absractness
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
cc96ai
Thanks
the diagram is kind of mess up,
A & B are siblings
C is child of B.
$root->set_node_list($root->get_node_list("A"), sort inOrder $root->get_node_list("B")) <-- this is the answer than I want.
Thanks