Forum OpenACS Q&A: Re: Include tag, key issue for package inter operability

Collapse
Posted by Ola Hansson on
Having packages use includes for its templated pages is probably a very good idea. For one, it makes it easy to write dotLRN applets.

Sometimes it's not even necessery to interpret ad_page_contract in the .tcl page script, if you use an include for the page. A single .adp page may call the include (oftentimes without any parameters at all) and let the ad_page_contract in the .tcl page of the include pair do all the interpreting ...

This may become especially convenient if the include handles optional keys, such as in a combined ad_form add/edit kind of page (where the existence of a key suggests to ad_form it should render an "add form" and vice versa) because you won't have to worry about whether to convey the key or not as a property, it's all handled by the include.

YMMV,