Forum OpenACS Development: Returning or including strings/widgets into a page while running a filter proc?

Is there some smart way to do the following?

1) register a filter for one individual URL

ad_register_filter postauth GET one_url filter_proc $subsite_id_one
2) create the filter_proc somehow (I'd like help here, please 😊
ad_proc -private filter_proc { conn subsite_id why } {

    <out of ideas>
        The equivalent of including a widget with the property $subsite_id ...

        (ns_write "blah" does not work very well)
    </out of ideas>

    return "filter_ok"
}
I am wondering since it would be nice to have something like this in the curriculum package. That way a bar belonging to one subsite could be included when visiting another subsite, if, and only if, an element's URL in one subsite exists under another subsite (that is where the filter comes in).

The idea is to register the filter when an element is added, and to later re-register it (all the subsite-external elements, actually) each time the server starts.

I'd be interested to hear if you think there's a better way to accomplish this whole thing, also!

Thanks.

Well, first off, what to register would need to be stored in the database, I don't think you want to change the startup scripts for every element that is added. Then you would just have a startup proc that would iterate over these entries, probably in a db_foreach, to register the procs.

But I think the filter that fires first is the rp_filter. Does that one run other filters? I don't know, but I guess not. You would need some kind of hook into the request processor. If that exists, you wouldn't need the registered filter in the first place.

Tom, I have abandoned further tinking in this direction. It became too complex too quick ...

What I've done instead is I've used frames! I believe they suck in most cases, but, in a situation where you want to link to "external" content while keeping navigational parts from the origin page in the browser window, I think I find them OK actually.

Feel free to see for yourself by following an external element over at our demo server:
http://oacs4.polyxena.net

/Ola

It does look fine with frames, I think this is a much simpler solution.

It looks like the registration pages haven't been translated or that the keys aren't being loaded?