Forum OpenACS Improvement Proposals (TIPs): Re: TIP #38 (Proposed): Modify template path resolution for ad_return_template, master tag and include tag

I spent more than a day hacking the master tag to change the search order. There are some problems with how this tag works which will not show up on casual testing.

For one, you cannot pass in a variable to src if the variable value is the empty string. The reason is because the code just checks that '@var@' isn't empty, which it never will be.

Another problem is that the master tag is only compiled the first time it is used. Any code which executes inside the master tag is essentially static (or removed from processing) after that point, so the search order will be fixed on the first pass.

My suggestion it to compute which master tag to use in the tcl page, and pass that value in. It always has to be non-null. Maybe it can be done in the request processor or something, otherwise test for the above problems when development is complete.