I have created an index.vuh that allows the home page to be managed by xowiki. It assumes the default locale and will show pages like this /index index of /xowiki/en/index. The urls will work with out without the language prefix for the default locale.
Here is the index.vuh
# -*- tcl -*-
set package_id (replace xowiki package instance here)
set folder_id (replace xowiki root folder_id here)
::xowiki::Package initialize -package_id $package_id -ad_doc {
This is the resolver for this package. It turns a request into
an object and executes the object with the computed method
@author Gustaf Neumann (gustaf.neumann@wu-wien.ac.at)
@creation-date July, 2006
@cvs-id $Id: index.vuh,v 1.2.2.2 2006/12/11 16:52:44 compass Exp $
} -parameter {
{-m view}
{-folder_id:integer $folder_id}
} -url /xowiki[ad_conn url]
#ns_log Notice "HAM : 12"
#::$package_id log "--starting... [ns_conn url] [ns_conn query] \
form vars = [ns_set array [ns_getform]]"
#::$package_id exists_form_parameter creator
#::$package_id log "-- [::xo::cc serialize]"
::$package_id reply_to_user [::$package_id invoke -method $m]
::$package_id log "--i ::$package_id DONE"
ad_script_abort
It hard codes the package_id and folder_id of the xowiki instance for now.
It requires a patch to package-procs.tcl to generate the correct relative URLs
Index: package-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v
retrieving revision 1.25
diff -r1.25 package-procs.tcl
70c70,74
< set lang [string range [lang::conn::locale -package_id [my id]] 0 1]
---
> # DAVEB we can resolve the default language on request instead of in the links
> #set lang [string range [lang::conn::locale -package_id [my id]] 0 1]
> }
> if {$lang eq [string range [lang::conn::locale -package_id [my id]] 0 1]} {
> set lang ""
73c77
< set host [expr {$absolute ? [ad_url] : ""}]
---
> set host [expr {$absolute ? "[ad_url][my package_url]" : ""}]
75c79
< return $host[my package_url]$lang/[ad_urlencode $name][expr {$anchor ne "" ? "\#${anchor}" : ""}]
---
> return $host$lang/[ad_urlencode $name][expr {$anchor ne "" ? "\#${anchor}" : ""}]
77c81
< return $host[my package_url][ad_urlencode $name][expr {$anchor ne "" ? "#${anchor}" : ""}]
---
> return $host[ad_urlencode $name][expr {$anchor ne "" ? "#${anchor}" : ""}]
I think this is a good think to start with. Eventually I'd like to create a way to manage content under a subsite more cleanly, but this seems like a good compromise that works today.
I think the URL resolution might be acceptable to be added to xowiki, hopefully Gustaf can comment if what I did works as expected.