[Zope] advice to track graphics rendering in DTML or python(script)

Robert Rottermann robert@redcor.ch
Mon, 29 Oct 2001 06:21:11 +0100


Hi Trevor,
If I understand your question correctly, you want to send an image only when
there one can be found under the UI .
The problem here is, that img needs to have a src that points to a valid
picture, otherwise you get an ugly empty picture symbol.

I tried the following script which I think solves your problem:
It has one parameter called UID

return context[UID].data

It is called as follows:
<html>
<body>
  <img src="http://localhost:8080/bevan/assets/pic?UID=halle.gif">
</body>
</html>

where bevan/assets is a folder with images.

Robert

----- Original Message -----
From: "Trevor Toenjes" <zope@toenjes.com>
To: "Robert Rottermann" <robert@redcor.ch>
Sent: Monday, October 29, 2001 1:11 AM
Subject: RE: [Zope] advice to track graphics rendering in DTML or
python(script)


> > cant that be named
> > http://zope/images/header.gif?uid=Alkj9876
> > then you can ask for the id with
> > <dtml-var uid>
> Robert,
> How are you? Thanks for the reply,
>
> I know this works for a webpage rendered from Zope.
> But what about a page rendered externally, that includes
> <img src="http://zope/images/header.gif?uid=Alkj9876">
>
> How do I capture the UID from a REQUEST for an image?
> Thanks,
> Trevor
>
>
> > there is also some way to get the URL with all the parameters that where
> > used. However I do not find it.
> >
> > Robert
> >
> > ----- Original Message -----
> > From: "Trevor Toenjes" <zope@toenjes.com>
> > To: <zope@zope.org>
> > Sent: Sunday, October 28, 2001 7:36 PM
> > Subject: [Zope] advice to track graphics rendering in DTML or
> > python(script)
> >
> >
> > > I have a template that needs to render a different header GIF,
> > based on a
> > > URL variable.
> > > eg: http://zope/images/header.gif?Alkj9876
> > >
> > > How do I capture the "UniqueID" in DTML so I can process a DTML-If and
> > > record the ID?
> > >
> > > TIA,
> > > Trevor
> > >
> > >
> > > _______________________________________________
> > > Zope maillist  -  Zope@zope.org
> > > http://lists.zope.org/mailman/listinfo/zope
> > > **   No cross posts or HTML encoding!  **
> > > (Related lists -
> > >  http://lists.zope.org/mailman/listinfo/zope-announce
> > >  http://lists.zope.org/mailman/listinfo/zope-dev )
> > >
> >
>