Forum OpenACS Development: Ahoy, how do I find a package instance's children? Gar. OACS: Ye'll ne'er get me buried booty!

Aye, am I correct in thinkin' that the site-node Api could use some help?

If Me have a package_id and want t' find its parent, I need t' call site_node::get_parent_id

If I have a package_id and want t' find all o' its children, I cannot.

If Me have a package_id and want t' find a specific child, Me need t' call site_node_apm_integration::get_child_package_id

Is thar an easier, more consistent interface that I just cannot find? Aye.

Sigh, I know pirate's day isn't till tomorrow.

Sigh, I know pirate's day isn't till tomorrow.
But that depend which o' the seven seas ye sail... If ye call yourself Australian then the day is young... Arrr....

( obOACS: not that I know of... )

    set node_id [site_node::get_node_id -url "/"]

    set child_node_ids [site_node::get_children \
			    -all \
			    -element node_id \
			    -node_id $node_id]

Beware that there is currently a bug in the call above in that it also returns the passed node_id (its 'self' is a member of the returned set).

Randy

Aye, Thank ye, me hearty.  I raise my grog to you!