I will try, although I don't completely understand your problem.

Instead of refering to your images with html, try using dtml.  This requires
that the images are Zope Image Objects.

Try this:

<dtml-if expr="images.myimage.jpg">
  <dtml-var expr="images.myimage.jpg">
</dtml-if>

That will place the image on the page if there is any object called "images"
with a subobject "myimage.jpg".  But wait.  There is a complication.  The
.jpg will really play with python.  If possible, rename the image to
"myimage_jpg" or just "myimage".  Content-Type should take care of the lack
of extension.  This method also works it's way up the entire zope tree.

May DTML methods cower at the sound of your name.

Troy

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 11:43 AM
To: [EMAIL PROTECTED]
Subject: [Zope] How to make broken images/links broken!


Hi folks,

I think this has to do with acquisition. Here's my problem.

I've an image, say
http://localhost:8080/colorado/images/myimage.jpg

Now, with Zope, if in a DTML document called
   http://localhost:8080/colorado/test.html
, I refer to it as  <img src="images/myimage.jpg"> it works
as expected.

However, if I have another DTML document called
   http://localhost:8080/colorado/slideshows/test2.html
which *also* refers to it as <img src="images/myimage.jpg">
the image appears there also. I don't want this to happen.
I would like this image to be broken as you would expect
in a normal, dumb webserver.

However, I don't want to turn off acquisition completely in all
the folders too (I don't know how to do that either).

Is there any thing we can do to test2.html which will not show
things like this?

FYI: This is for a content management application using Zope.
We use Zope to make our content, then make static pages
into file system to be served by IIS. All that works very nice.
But users often give wrong URL for their images in the content
and in the Zope DTML method (like test2.html) which does the preview,
these images appear all right and so they think it is going to be OK
in the static version too.  I'm using something like ZIE for editor,
so at least in that if we can disable acquisition, that would be neat.

Many thanks in advance


V.Satheesh Babu     Web Technologies Group, (703)-841-5348    [EMAIL PROTECTED]
The Nature Conservancy                http://www.tnc.org  
http://vsbabu.csoft.net/
"The man who smiles when things go wrong has thought of someone to blame it 
on." --- Jone's Law

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
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 )

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
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 )

Reply via email to