Forum OpenACS Q&A: Re: returning content from an include without a .adp

Collapse
Posted by Dave Bauer on
Collapse
Posted by russ m on
is that not for executing a tcl/adp pair from within tcl code? that's not what I'm trying to do... in the template for some page, say I have

<include src="../lib/related-items" asset_id="@asset_id@">

and then in related-items.tcl I want to be able to do something like

set related_items [asset_related_items $asset_id]
if { [llength $related_items] == 0 } {
  write_some_content_to_the_templated_output "<p>no related items</p>"
  return_here_and_dont_parse_the_adp_file
}
... more stuff ...

so I don't need to have the entire .adp wrapped in a big conditional that just says whether to display anything or not...