On Mon, Dec 07, 1998 at 04:48:41PM -0500, Brian Lloyd wrote:
I see what you're saying now. I think this boils down to the usage of the __str__ method of Image objects:
def __str__(self): return '<IMG SRC="%s" ALT="%s">' % (self.__name__, self.title_or_id())
Right this is what I was tweeking the other night trying to get this to work, but couldn't figure out how to find it's hierarchy.
I believe that this was added as a little convenience, rather than a universally applicable thing. The problem here is that you want (need) control over the SRC attribute. I would suggest that it's better all around to simply use a bit of DTML like:
<img src="images/logo" alt="<!--#var "logo.title_or_id()"-->" width="<!--#var "logo.imgWidth"-->" ...>
Maybe I'm lazy, but this seems like an AWEFUL lot of work that can't be automated by site tools (ney Dreamweaver), and that shouldn't be needed to be typed 5000 times when it's nearly always identical. I understand I'm looking for an easy solution, BUT... for example, in Frontier, yo ucan type something like: #image "blah.gif" And it will insert everything needed (including H/W tags). This works even if you happen to have things stored in a subdirectory if I recall (it's been a while). I know that most sites Zope has been used for probably aren't that graphically intense, but a lot that I work on are, and I'd be stuck with nearly a billion of these refernces or writing custom code that probably is identical to other people's custom code. For the object repository to be useful, it has to be able to SIMPLIFY my life, not complicate it :-) So since I'm a glutton for punishment, why wouldn't a tag: <!--#var imagename--> Be allwoed to insert it's location in full, rathre than relative (which should never break anything I can thinik off off-hand), as well as it's ALT and H/W tags (which maybe should be stored in properties now that I think about it, and only updated when the image is inserted into the database/updated, lower overhead). Humor me here :-) Chris -- | Christopher Petrilli | petrilli@amber.org