[Zope] Other content types and ZPT

Oliver Bleutgen myzope@gmx.net
Wed, 21 May 2003 16:08:01 +0200


Jeremy Cook wrote:
> Hi,
> 
> I want to create a real audio metafile (.ram extension) on the fly using
> templates but am struggling with this. A .ram file should contain a
> single line with the URL of the media file that I want the client
> browser to play. I want to create this URL using ZPT so that the correct
> URL relative to the portal home is given.
> 
> I don't want to use a hard coded URL because that would mean that my
> media content wouldn't work when I move my portal to another location
> for off-line editing. It would also mean that links could be broken in
> an obscure way some time in the future.
> 
> If I create a 'page template' called 'RMTheJam.ram' with a simple line
> pointing (for now) to a hardcoded URL:
> 
> http://217-13-29-76.dd.nextgentel.com/KSMi/interactive/TheJamBam.rm
> 
> and then in the Page template editor change the content_type from
> text/html to audio/x-pn-realaudio then I get an error 
> 
>   "cannot import name expat".
> 
> Any ideas how to achieve a dynamic real audio metafile?

Why not use a python script for that?

cheers,
oliver