Forum OpenACS Development: Re: ad_page_contract to be used on includes
Sorry Dave, I should have read your bug report more carefully. I think there are 2 separate issues here.
One has to do with your bug (ie, ad_page_contract throws an error when the variable already exists from a previous invocation of ad_page_contract). Checking for its existence seems like a reasonable solution, though it might mask a deeper problem relating to parse levels and such. I dunno.
The other has to do with allowing 'includes' to provide a contract for invoking them. If this is a desired feature, I like Peter's idea for an ad_include_contract.
In any case, bottom line, I don't think ad_page_contract's fundamental behavior should be changed in any way (other than fixing that weird bug ofcourse!)