Re: [Zope3-Users] External content with ZPT

2007-02-26 Thread Maciej Wisniowski

 Is there a simple way to use ZPT to include external content?
 Something that resembles Apache SSI--I was hoping there is something
 along the lines of tal:include=addr but it does not appear to be
 quite this easy. The content in question is a script that I'd rather
 not rewrite.
The 'script' you're talking about returns HTML?? Is this a web page?
web service? file? It is available under URL? The  content is script
itself or something that this script returns?

Not sure if I understand correctly but if you want to paste some html
from url, then AFAIK ZPT has no statement (shortcut) for this kind of
things.

 Search has turned up wrapping the functionality in python code. Can I
 do this without a urllib2 wrapper?
Depends what 'external' is for you... In general you may use different
protocol, something with xml-rpc, json and this stuff. What is wrong
with urllib2? On the other hand you may just use iframes or some
javascripts/ajax things on the client side.

-- 
Maciej Wisniowski


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] External content with ZPT

2007-02-26 Thread Marius Gedminas
On Mon, Feb 26, 2007 at 01:08:17PM -0500, Sam Young wrote:
 Is there a simple way to use ZPT to include external content?

Assuming that your ZPT is a template used for a view,

  span tal:replace=structure view/whatever /

where your view class has a method called 'whatever' that
reads/downloads/acquires by whatever means necessary the external
content you want.

 Something that resembles Apache SSI--I was hoping there is something
 along the lines of tal:include=addr but it does not appear to be
 quite this easy. The content in question is a script that I'd rather
 not rewrite.

There is no direct way to access files or URLs within ZPTs.

Marius Gedminas
-- 
To be intoxicated is to feel sophisticated but not be able to say it.


signature.asc
Description: Digital signature
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users