[Zope] 'including' output from external files in a DTML doc?
Mark Millikan
mmillikan@vfa.com
Fri, 21 May 1999 11:00:58 -0400 (Eastern Daylight Time)
No claims of efficiency or elegance, however this has worked for me,
this is doc1:
<!--#unless "REQUEST.has_key('minimalLineItems')"-->
<!--#call "RESPONSE.redirect(vfaEstimatorURL+'rt1?ReturnURL='+URL+'&'+createQSForEstimator())"-->
<!--#/unless-->
<!--#if "REQUEST.has_key('minimalLineItems')"-->
process page with results passed back in REQUEST['minimalLineItems']...
<!--#/if-->
this is doc2(in this case rt1):
<!--#if "REQUEST.has_key('ReturnURL')"-->
<!--#if "REQUEST.has_key('sitCSIItems')"-->
<!--#call "RESPONSE.redirect(ReturnURL+'?minimalLineItems='+genMinimalLineItems(sitCSIItems))"-->
<!--#/if-->
<!--#/if-->
1. 'doc1' is called directly, therefore REQUEST['minimalLineItems'] doesn't exist.
2. It packs up its URL as the query parameter 'ReturnURL'.
3. It adds to the query whatever else 'doc2' expects as input.
4. It does the redirect to 'doc2'.
5. 'doc2' verifies it has been sent the query parameters it needs.
6. It does its processing thing.
7. It builds a query string with the 'return data'.
8. It does the redirect to the 'ReturnURL' furnished by 'doc1'.
9. 'doc1' now has the package of data it needs and goes about its business.
note:
a. 'doc1' could pass the URL of an arbitrary 'doc3' as the 'ReturnURL'
to 'doc2'.
b. none of the 'docs' need to be dtml/python, I've used asp for 'doc1'
and 'doc3'.
Hope this helps.