I'm just coming to OpenACS, and I've been chatting with some others about how OpenACS does lookups while processing the 'src' attribute of an <include> tag.
From the docs (https://openacs.org/doc/acs-templating/tagref/include.html):
"If the src attribute begins with a slash, the path is assumed to be relative to the server root, the parent directory of the tcl library. If not, the path is assumed to be relative to the current template, not the URL of the page request."
When customizing a package (usually the look and feel), I've found that one usually has to copy large portions of the package because the <include> tags have relative references in the 'src' attribute.
I'd like to suggest that a preliminary step be added to the 'src' processing: before checking the package page_root for the file(s), check the package_url - *then* fall back to the above-described behavior. This means a second lookup in some cases, but in many it means that a developer only has to customize those files directly related to what they're doing.
An example, in the likely case that I'm not being clear:
1) I have an instance of Lars-Blogger mounted at /blog/.
2) In order to customize the appearance of my weblog, I want to change entry_chunk.adp. I don't mind copying entry_chunk.tcl too for now. So I put them in /www/blog/.
3) When the page is served, entry_chunk is included by blog.adp:
<include src="entry_chunk" etc.>
4) My entry_chunk in /blog/ is ignored - the template processor looks in /packages/lars-blogger/www/ and finds entry_chunk there.
5) In order to modify my entry_chunk, I have to copy over blog.tcl, blog.adp, blog-*.xql, etc. This is not very friendly.
Anyway, what I've suggested is one way to approach the problem. Anyone have any other ideas? I don't imagine I'm the first person to run into this.