OK, here's the DTML: <!--#var standard_html_header--> <!--#with "_[movie]"--> <H3><!--#var title--></H3> <P> <B>Seen</B>: <!--#var review_date--> @ <!--#var theatre--> </P> <!--#/with--> <!--#var "_[movie]" fmt="structured-text"--> <!--#var standard_html_footer--> The problem is this... I'm passing this an object id as a GET variable (showFoo?movie=bar), and it's not working correctly to grab the title of the document ID I'm handing it. movie = DTML document, it has all those properties (title, review_date, theatre), but theydon't want to show... I get attribute errors. If I take out all but <!--#var title--> I get the title of the enclosing folder, not the movie document. THis works just fine in another DTML method that looks idental to this one. Ideas? Must be something silly. Chris -- | Christopher Petrilli ``Television is bubble-gum for | petrilli@amber.org the mind.''-Frank Lloyd Wright
Christopher If you replace your DTML with <!--# var "_[movie]"--> Do you get the expected results? Pavlos On Sun, 4 Apr 1999, Christopher Petrilli wrote:
OK, here's the DTML:
<!--#var standard_html_header-->
<!--#with "_[movie]"--> <H3><!--#var title--></H3>
<P> <B>Seen</B>: <!--#var review_date--> @ <!--#var theatre--> </P> <!--#/with-->
<!--#var "_[movie]" fmt="structured-text"-->
<!--#var standard_html_footer-->
On Sun, Apr 04, 1999 at 10:36:38AM -0400, Pavlos Christoforou wrote:
Christopher
If you replace your DTML with
<!--# var "_[movie]"-->
The <!--#var "_[movie]"--> part correctly inserts the body of the DTML Document... the rest are supposed to grab properties of the document, if that makes sense? THat's what's so odd... the <!--#var "_[movie]"--> tag works as expected, it's the <!--#with tag that doesn't. Chris -- | Christopher Petrilli ``Television is bubble-gum for | petrilli@amber.org the mind.''-Frank Lloyd Wright
On Sun, Apr 04, 1999 at 03:35:56AM -0400, Christopher Petrilli wrote:
OK, here's the DTML:
<!--#var standard_html_header-->
<!--#with "_[movie]"--> <H3><!--#var title--></H3>
<P> <B>Seen</B>: <!--#var review_date--> @ <!--#var theatre--> </P> <!--#/with-->
<!--#var "_[movie]" fmt="structured-text"-->
<!--#var standard_html_footer-->
The problem is this... I'm passing this an object id as a GET variable (showFoo?movie=bar), and it's not working correctly to grab the title of the document ID I'm handing it. movie = DTML document, it has all those properties (title, review_date, theatre), but theydon't want to show... I get attribute errors. If I take out all but <!--#var title--> I get the title of the enclosing folder, not the movie document. THis works just fine in another DTML method that looks idental to this one.
OK, while this seems to work in an IDENTICAL situation elsewhere, replacing the with tag with: <!--#with "_.getitem(movie,0)"--> works fine :-) THIS IS ODD! ;-) Maybe I'm just imagining things---that's not the firsttime! Chris -- | Christopher Petrilli ``Television is bubble-gum for | petrilli@amber.org the mind.''-Frank Lloyd Wright
At 03:35 AM 4/4/99 -0400, Christopher Petrilli wrote:
OK, here's the DTML:
<!--#var standard_html_header-->
<!--#with "_[movie]"--> <H3><!--#var title--></H3>
<P> <B>Seen</B>: <!--#var review_date--> @ <!--#var theatre--> </P> <!--#/with-->
<!--#var "_[movie]" fmt="structured-text"-->
<!--#var standard_html_footer-->
The problem is this... I'm passing this an object id as a GET variable (showFoo?movie=bar), and it's not working correctly to grab the title of the document ID I'm handing it. movie = DTML document, it has all those properties (title, review_date, theatre), but theydon't want to show... I get attribute errors. If I take out all but <!--#var title--> I get the title of the enclosing folder, not the movie document. THis works just fine in another DTML method that looks idental to this one.
It looks like you want with to use an object named by the variable movie. "_[movie]" calls the object named by the variable movie. You probably want "_.getitem(movie)" which returns the object named by the variable movie without rendering it. -Amos PS. Whenever you see Zope complaining that a string doesn't have an attribute there's a good chance that you're using a rendered object, that is to say, a string, rather than the object itself.
participants (3)
-
Amos Latteier -
Christopher Petrilli -
Pavlos Christoforou