Forum OpenACS Q&A: Subsites, Host-Node Map, and Context Bar

I am developing a 5.0.4 site/application that will use subsites to virtually host similar type sites via one code base and database. This is the first time I have worked much with subsites in awhile.

For a subsite mounted at and mapped to, why aren't the paths in the context bar rooted at /subsite? For example, when you are at, all paths appear as instead of

Why is the context bar in the form of:

  Main Site -> Subsite -> Page

...instead of...

  Subsite -> Page

Were these design decisions? Are there parameters somewhere that modify this behavior?


Posted by Barry Books on
I do exactly the same thing but some of my subsites have nothing to do with each other. The context-bar is set in www/default-master.tcl. if you add something like
if { [template::util::is_nil context_bar] } { 
        if { [ad_conn package_key] eq "acs-subsite"  } {
                set subsite_node_id [ad_conn node_id]
        } else {
                set subsite_obj_id [site_node::closest_ancestor_package -node_id [ad_conn node_id]]
                set subsite_node_id [site_node::get_node_id_from_object_id -object_id $subsite_obj_id]
    set context_bar [ad_context_bar -from_node $subsite_node_id ]
in place of just setting the context bar it will probably do what you want.
Posted by Jade Rubick on
It would be nice to be able to set this per subsite, as a parameter. Anyone willing to take this on?