Forum OpenACS Q&A: creating a package that outputs xml

Collapse
Posted by Matthew Smith on
I am just starting with my first package. I have written a very simple index.adp and index.tcl. When I browse to this, it is wrapped inside of the openacs framework, including
all the html.

I would like to control the output so all that is output is the html I have in a variable, or xml. How do I do this?

Collapse
Posted by Dave Bauer on
Check out the templating documentation at
YOURSITE/doc/acs-templating
You probably need to remove the <master> tag from your ADP templates. That will suppress the openacs template around your content. If the content is in a Tcl variable, you can also just return it from the Tcl script like this:
ns_return 200 text/html $var
or
ns_return 200 text/xml $var
Collapse
Posted by Matthew Smith on
Thank you, Dave. I'll check it out.

Cheers.