Possible error in Sams Publishing Zope book?
Hey, y'all... New to the list, new to ZOPE, trying to learn. As the subject line implies, I have a book from Sams Publishing, titled "Zope," subtitled "web application construction kit" which has examples in it. I love examples... Most of the first 3 chapters revolve around setting up, making database connections and what not. Chapter 4 starts an example for a type of discussion board. The security that they ask you to set is no view for anonymous access, basically requiring a login before you can see the page. They give the following section of code for the index_html: <dtml-var standard_html_header> <center> <dtml-if "AUTHENTICATED_USER.has_role('Anonymous')"> <h3>Welcome to your Message Board</h3> <p> Please identify! <p> <a href="login_html">Login</a> </dtml-if> </center> <dtml-var standard_html_footer> Using this code, exactly as-is, I receive the following error: Compilation failed TAL.HTMLParser.HTMLParseError: malformed start tag, at line 3, column 10 The given location is the first " in the dtml-if statement. Now, I'll admit, I'm not a programmer, and I've never played one on TV, but there are other pages in the same site that use the dtml-if statement with a ", and none of them throw that same error. Can someone clue me in on this? It's been driving me nuts.... Michael Kleymann
Hello Michael, Thursday, May 9, 2002, 7:41:35 AM, you wrote: MK> Hey, y'all... New to the list, new to ZOPE, trying to learn. welcome aboard :-) MK> Using this code, exactly as-is, I receive the following error: MK> Compilation failed MK> TAL.HTMLParser.HTMLParseError: malformed start tag, at line 3, column 10 [snip] MK> Can someone clue me in on this? It's been driving me nuts.... Looks to me like you are writing dtml-tags in a PageTemplate-object.. PageTemplates don't use DTML , but TAL and METAL.. You should make sure that your document is a DTMLmethod or a DTMLdocument if you plan to use DTML-tags in there... PageTemplates are in my opinion a much better and cleaner way that DTML , but some people seem to be of the opinion that DTML is simpler to learn.. Anyway - your examples are DTML , so that's obviously what you want to do for now.. good luck :) -- Geir Bækholt web-developer geirh@funcom.com funcom oslo | webdev-team
participants (2)
-
Geir Bækholt -
Michael Kleymann