Forum .LRN Q&A: Re: How to relate community_id with package_id

Hi, thanks for your help Don, Carl, Roc.

I finally could do what I was trying, this is (for the record) the way I did it (thanks to roc@ help)

-Get the url with the community_id:
      ... dotlrn_community__url(community_id) as url ...
-Get the community info using the community url:
      array set array_with_info [site_node::get -url "${url}[apm_package_key_from_id [ad_conn package_id]]"]

This last command returns an array with all the information about the istance of [ad_conn package_id] mounted in that community.

I hope this help someone else in the future!

the thing was that Jose needed to know the package_id of a given package instance for a given community_id, so with having the community_id you can get the url of it, and then joining url + the package-key to form the full url for the specific application instance, and then, with that full url using site_node::get to get the package_id.

i.e.

../classA/  (we know the community_id)
../classA/evaluation  (we want to know the package_id for the evaluation instance)

solution:  site_node::get -url "../classA/evaluation" will return among other things, the package_id

=)