[Zope] - Yet another stupid question: image folders
Andrew Zeldis
azeldis@wesleyan.edu
Mon, 7 Dec 1998 17:22:19 -0500 (EST)
This is sounding to me like 1) a cool feature; and b) a new tag.
Howbout a general "html" or "link" or "href" tag:
<!--#link name="logo.gif" fmt="img"-->
or some such. Then the magical elveZ would say, "image, better find out
how big it is, blah blah"...
I know new tags are the wrong (perl) way to go, but if they are general
enough... Thus, better to go with #link or #href rather than #img...
Keep it general.
Because printing an "image" object out shouldn't give more than either its
name or URL. It certainly shouldn't spit out any HTML code, which is what
this dude is wanting to do.
On Mon, 7 Dec 1998, Phillip J. Eby wrote:
> At 04:40 PM 12/7/98 -0500, Christopher G. Petrilli wrote:
> >On Mon, Dec 07, 1998 at 04:35:43PM -0500, Phillip J. Eby wrote:
> >> <!--#with images--><!--#var logo--><!--#/with-->
> >
> >This works, but I'm gonna whine that it's WAY too much typing :-)
>
> Well, if you do this a lot, define a 'logo' document which contains it,
> then everywhere else you'll only need to call it once. If you want it to
> be more dynamic, make a 'showSubImage' document and make it say:
>
> <!--#with imgFolder--><!--#var "_[imgName]"--><!--#/with-->
>
> And then call it with:
>
> <!--#var "showSubImage(imgFolder=images,imgName='logo')"-->
>
> Unfortunately, this is actually longer than the original 'with' version,
> but at least it shows off some DTML hacking techniques. :)
>
>
> >Prefferable (though currently illegal) would be:
> >
> ><!--#var logo with=images-->
>
> Ugh. Please don't go there.
>
>
> >Somehow I think this could be useful for a lot of things... just don't
> >ask me what else. Alas, I think this is how Perl got the way it is.
>
> Yep. :) Always be wary of taking an initially simple and clever idea and
> then beating it to death with a dead horse, or something like that. :)
>
>
>
>
- AEZ