> > This should work:
> >
<dtml-var "blah(REQUEST, class='fooimage', alt='[Can't use dtml
tags
inside
> > dtml tags]', pdcookie='1')">
>
> Zope
spits out the following:
>
> Expression (Python) Syntax
error:
> invalid syntax
>
> , for tag <dtml-var
"blah(REQUEST, class='fooimage', alt='[Can't use dtml
tags
> inside
dtml tags]', pdcookie='1')">, on line 6 of index_html
>
> It
gives the same error if I use the other version.
I hope that you did not take
my example literaly. I included an extra
apostrophe (')
in the example
that would give a syntax error. Here is a simplier example.
<dtml-var
"blah(REQUEST, alt='your text', pdcookie='1')">
Add all the additional
tags that you would want. Remember that blah needs to
be photo object, not an
attribute with the name of the photo
> > Let me know right away if
this doesn't work for you.
>
> The *major* problem I am suffering is
that I don't know what "blah" is in
my
> method, so the above doesn't
work.
>
> The ZClass FooImage has a property "image".
> Inside
the image property for a given instance, I stick the ID of the
proper
>
photo object.
> My DTML is in the index_html method of
FooImage.
>
> I don't know how to tell DTML to grab the object
referred to by "image"
(as
> opposed to the string CONTENTS of the
"image" property, which is what it
does
> right now, I assume).
If I just plug in the Property name as in
> "image(REQUEST", then it gives
a "call of non-function" error.
>
If I understand your problem
correctly, you should be able to do this.
<dtml-with blah> # blah is an
attribute of the index_html document
<dtml-var "tag(REQUEST,
pdcookie='1', alt='your text')">
</dtml-with>
Also, you could
loop through all the Photos in a container as follows.
<dtml-in
"objectValues('Photo')">
<dtml-var "tag(REQUEST, pdcookie='1',
alt='your text')">
</dtml-in>
> > > Alternately,
figuring out how to use this "pdcookie" feature from a
normal
> >
> <img> tag would work too.
The pdcookie feature is nothing more
than a switch to spit out some html.
Feel
free to copy that anywhere you
need. The trick is to set the cookie in the
user's
browser.