Forum OpenACS Development: Using an xowiki page as a subsite index page

I have a site with a number of subsites, and for some of the subsites I would like to use an xowiki page from within that subsite as the index page. So, for example, a user going to /subsite2 would end up seeing /subsite2/xowikimountpoint/somepage, but /subsite1 and /subsite2/forums would remain unaffected.

I tried creating an index.vuh file in acs-subsite/www, which is a variation of the one Gustaf supplies in his documentation for doing this at the root level. In order to restrict this to only the subsite that needs it, I have this:

::xowiki::Package initialize -ad_doc {

} -parameter {
{-m view}
{-folder_id:integer 0}
} -url /subsite2/xowikimountpoint

if { [string first /subsite [ns_conn url]] == 0 } {
::$package_id reply_to_user [::$package_id invoke -method $m]
ad_script_abort
} else {
ad_returnredirect index1
}

In limited testing this seems to work just fine, though it seems a bit hackish. The thing I don't like about it is having to rename the index file for the unaffected subsites to index1.

Is there a better way to do this?

Collapse
Posted by Torben Brosten on
Will an index.vuh file work at serverroot/www/subsite2/index.vuh so that it only affects that one subsite and not the other subsites?
Collapse
Posted by Janine Ohmer on
Yes, actually, this does work. I had tried this in acs-subsite/www and it didn't work there, and I didn't think to try it here. I'm still not 100% clear on how subsites work.

Thanks for the tip!

Collapse
Posted by Ryan Gallimore on
Can you not just set the IndexRedirectURL parameter to go to the xowiki page? Or am I missing something?
Collapse
Posted by Janine Ohmer on
IndexRedirectURL is a kernel parameter, so it's global to the site. It works fine for the main site, but doesn't affect the subsites at all.
Collapse
Posted by Gustaf Neumann on
goto the sitemap /admin/site-map/, to the parameters of the subsite: One can specify an IndexRedirectUrl here as well (per subsite).
Collapse
Posted by Dave Bauer on
Each subsite also has a IndexInternalRedirectUrl which performs and rp_internalredirect which does not change the URL in the browser for perform an HTTP redirect.