Forum OpenACS Development: ad_conn subsite_id and subsite_url

Collapse
Posted by Lars Pind on
I was just browsing through the GP Planet code with Peter, and I noticed that they've added one more value to ad_conn, namely "ad_conn subsite_id", which returns the result of site_node_closest_ancestor_package "acs-subsite".

I think that's a pretty nice feature when you want to redirect to e.g. permissions, parameters, etc.

I also think it would be nice to add the corresponding subsite_url.

What do others think about this idea? Useful, stupid?

Btw, is there any documentation for the internal site_nodes data structure?

/Lars

Collapse
Posted by Don Baccus on
Useful but it would be nice to cache the mapping so you don't have to do a query every time ...
Collapse
Posted by Lars Pind on
Definitely. I timed the existing site_node_closest_ancestor_package proc (which, it looks like, is being run on every single page hit on greenpeace.org), and it took anywhere from 750 to 2500 microseconds on our box.

The good thing is that there's no database hit involved.

I'm thinking that we could simply include the nearest subsite_id in the internal site_node data structure that we already have.

/Lars

Collapse
Posted by Roberto Mello on
Sounds very useful. Is this going to be in 4.6 (if it isn't already)?

-Roberto