The Toolkit for Online Communities
18813 Community Members, 0 members online, 2153 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : How to find nearest subsite

Forum OpenACS Development: How to find nearest subsite

Icon of envelope Request notifications

Posted by Lars Pind on
I'm trying to figure out if there's a way to find the URL of the
nearest instance of acs-subsite surrounding the current node.

This would be really useful when you need to redirect to things like
permissions, site map, subsite admin, etc., instead of hardcoding a
redirect to /permissions, for example.

Posted by Arjun Sanyal on
Lars, check out site-nodes-procs.tcl in /packages/dotlrn/tcl/. It's a bunch of utilities I wrote to do just this sort of thing. You probably want site_nodes::get_parent_id (which returns a node_id) and site_nodes::get_url_from_node_id.
Posted by Barry Books on
site_node_closest_ancestor_package_url [ -default default ]
    [ -package_key package_key ]
Posted by Lars Pind on
Cool, thanks. Didn't know about that.