Hello All, I do read HOW-TO's, User-Guides, etc., but I think DTML must be made simpler, or better documentation, or more examples. As an example, within an <dtml-in> loop: 1. You can print the values of sequence-items with: (index=<dtml-var sequence-index>, number=<dtml-var sequence-number>, item=<dtml-var sequence-item>) 2. To test for equality, this does not: <dtml-if "sequence-index == 0"> (<dtml-var count-adassnum> Records found) </dtml-if> 3. While this does work: <dtml-if "_['sequence-index'] == 0"> (<dtml-var count-adassnum> Records found) </dtml-if> I say this is confusing. Don't tell me to read the Namespace How-to, or the Zope User Guides, I did, and it's still confusing! Unless you find an example, that does exactly what you want, trying to figure it out with the documentation available can be difficult. I found my answer to this in the "How-To: (How-to) access the field names and fields of any arbitrary ZSQL query", but it took a lot of searching the Zope site for references to 'dtml-in'. I get so frustrated with DTML, I want to scream. Please don't tell me to buy the Zope book, DTML should be more intuitive. DTML maybe the heart of Zope, but it's also it's achilles heel. -- irene ------------------------------------------------------------------ Irene Barg Email: ibarg@as.arizona.edu Steward Observatory Phone: 520-621-2602 933 N. Cherry Ave. University of Arizona FAX: 520-621-1891 Tucson, AZ 85721 http://nickel.as.arizona.edu/~barg ------------------------------------------------------------------
It's a give-and-take I think. I had the same confusion as you have right now, but after a while you learn this syntax pretty well. This is the same as with all syntax, and as soon as you have learned the basics the rest is easy and from then on a matter of learning how to use extensive functions and methods. I found DTML confusing as well in the begining, but I know feel that DTML is not bad at all. The DTML syntax is sometimes even more convenient than - otherwise known to be simple - PHP syntax. If you read the Zope Book by Michael and Amos you'll be told to use Python Methods for almost all functionality and leave DTML as a very basic tool for your content visualization. Don't give up Irene! This is just part of the steep (almost exponential) Zope learning curve. Greetings, peter
I say this is confusing. Don't tell me to read the Namespace How-to, or the Zope User Guides, I did, and it's still confusing! Unless you find an example, that does exactly what you want, trying to figure it out with the documentation available can be difficult. I found my answer to this in the "How-To: (How-to) access the field names and fields of any arbitrary ZSQL query", but it took a lot of searching the Zope site for references to 'dtml-in'. I get so frustrated with DTML, I want to scream. Please don't tell me to buy the Zope book, DTML should be more intuitive. DTML maybe the heart of Zope, but it's also it's achilles heel.
* peter bengtson (peter@grenna.net) [001110 10:40]:
It's a give-and-take I think. I had the same confusion as you have right now, but after a while you learn this syntax pretty well. This is the same as with all syntax, and as soon as you have learned the basics the rest is easy and from then on a matter of learning how to use extensive functions and methods.
Considering that DTML is supossed to be for web/html writers, *not* for programmers, I think that's not a good attitude to take. I don't want web-writers having to figure out that to access a variable, *that was being use a second ago with no extra syntax* suddenly needs _[''] wrapped around it. It doesn't make any sense UNLESS you know what's going on underneith. And since the whole attitude for Zope is, "do it right". I'd say this needs to be addressed at some point. Ciao! -- Although the moon is smaller than the earth, it is farther away. The Doctor What: A really hip dude http://docwhat.gerf.org/ docwhat@gerf.org KF6VNC
participants (3)
-
Irene Barg -
peter bengtson -
The Doctor What