On Wed, 27 Feb 2002, Roy Mathew wrote:
Dear Zopesters,
What is the preferred way to render another URL inside of your page template. I don't think I want to use acquisition, since the other URL may not even developed by me (Sort of like how you can dock Visio inside of MSWORD). Is there a sort of <dtml-include> type tag.
Thanks, Roy Mathew.
It's not a Zope Thing, but FRAMEs or IFRAMEs might be the easiest and best way to do this, depending on what you want. A Zope way would be to write an External Method that uses urllib to get the document, strip off the <html>...<body> tags and </body></html> tags and return the middle. If you know any python, this would be an easy problem. More interesting and more tricky would be to get that page content into the ZODB as a cacheable thing (maybe in 2.5, in the temporary objects folder) so that every time your page is hit, you don't have to run off and look for another URL, which may or not be accessible at that moment. (Of course, if this content is served on your server, this wouldn't be a problem.) If this is content is served from same server, one interesting start of an idea would be: have the Zope document that needs to include something else (the "parent" doc) be in a certain folder or have a certain extension. Have Apache (assuming you use it for a front end) recognize that as a server-parsed document, and have Zope emit the proper .shtml tag for including another doc. Simple and keeps Zope/Python from doing the lifting. Other ideas? -- Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Independent Knowledge Management Consultant