More searching fun! My apologies in advance for knowing so little about how openacs searchnig works - I've never really used it so far...
I am using etp (original) on my own site and I wanted to index it - seing as ther is no etp specific binding, I figured the content repository bindings would allow them to be indexed, which it did.
Prblem is, the links returned in the result set are of the form /acs-content-repository/the/actual/url?revision_id=1234
index.vuh in /acs-content-repository/ barfs BIG time because etp doesn't seem to do the appropriate cr templating stuff... I got kinda lost there
since etop renders it's own files, I put the following EXTREMELY DODGY hack at the top of packages/acs-content-repository/www/index.vuh to redirect etp pages to themselves:
set item_id [db_string item_id "select content_item__get_id(:the_url, :content_root, 'f')"]
set possible_pkg_id [db_string possible_pkg_id "select context_id from acs_objects where object_id = :item_id"]
if { [db_string foo "select object_type from acs_objects where object_id = :possible_pkg_id"] == "apm_package" } {
if { [apm_package_key_from_id $possible_pkg_id] == "edit-this-page" } {
ad_returnredirect "/$the_url"
}
}
My questions are:
- can this problem be solved with an etp specific search binding that will override the standard cr one for etp pages? (if so I will look into it - probably for etp v2)
- is this problem going to occur for other packages that use the cr for their data storage? if so, how can we generically solve it?
Thanks for everyones help!