is dtml-in doing a dtml-with? How do I turn off that behaviour?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thinking more about my problem I mailed before... Maybe dtml-in is actually doing a dtml-with on each of the "objectValues(['DTML Method'])". In that case any dtml-with that came after (even within one of those DTML Methods), would be screwed up, since you can't really descend into a method like you can a folder. ............... 2 Questions: ............... * Is there any way to turn off this dtml-with behaviour in dtml-in? * Or maybe my assumption is plain wrong? Seems like this behaviour should not be default. Like, if you really wanted a dtml-with, then you should explicitly call dtml-with right after the dtml-in. I wonder why it would be implemented this way? ............... 3rd Question: ............... Is there a reference manual out there that gives _real_ documentation of structured dtml? All I've found is sketchy examples. I want a very thourough/rigorus examination of every feature and every parameter of every dtml tag (namly dtml-in for now). You find this quality of documentation in some software API's. I can't seem to find anything even close for Zope. Kevin -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com> iQA/AwUBOLhJ4DlszdAdzf4MEQLAdwCg0tYnNfFDmETvHifhRZXH9eOedkkAoMOj /pBpJgPWdbcCfRV0L7rzZk5E =VErH -----END PGP SIGNATURE-----
On Sat, 26 Feb 2000, Kevin Meinert wrote:
Thinking more about my problem I mailed before... Maybe dtml-in is actually doing a dtml-with on each of the "objectValues(['DTML Method'])".
Yes and no. dtml-in actually makes each object in the iteration sequence part of the namespace. For instance (untested): <dtml-in objectValues> ... </dtml-in> <dtml-in objectIds> <dtml-with sequence-item> .... </dtml-with> </dtml-in> are equivalent. <dtml-in> does not 'do' anything to the objects in the sequence, it is objectValues that does the job, by returning a sequence of objects. objectIds however returns just their ids.
Is there a reference manual out there that gives _real_ documentation of structured dtml? All I've found is sketchy examples. I want a very thourough/rigorus examination of every feature and every parameter of every dtml tag (namly dtml-in for now). You find this quality of documentation in some software API's. I can't seem to find anything even close for Zope.
Extra parameters aside, the dtml-in tag behaves like a python for loop. Probably you can find descriptions of the extra parameters in the Zope Quick Reference as well as descriptions of objectIds,objectValues etc http://www.zope.org/Members/ZQR Pavlos
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Extra parameters aside, the dtml-in tag behaves like a python for loop. Probably you can find descriptions of the extra parameters in the Zope Quick Reference as well as descriptions of objectIds,objectValues etc http://www.zope.org/Members/ZQR
Is there a way to iterate over the elements in a folder other than dtml-in? Maybe by using python for loops? -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com> iQA/AwUBOLhiATlszdAdzf4MEQISDQCgi5612hZnkZLO7hs4DZAbWPjymogAn2Tz nlzs9FcdlJ7eHSIn7cf0lc3U =TjIE -----END PGP SIGNATURE-----
Kevin Meinert wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Extra parameters aside, the dtml-in tag behaves like a python for loop. Probably you can find descriptions of the extra parameters in the Zope Quick Reference as well as descriptions of objectIds,objectValues etc http://www.zope.org/Members/ZQR
Is there a way to iterate over the elements in a folder other than dtml-in? Maybe by using python for loops?
Of course. objectValues returns a python sequence like any other. -Michel
On Sat, 26 Feb 2000 17:30:09 -0600, "Kevin Meinert" <kevn@vrac.iastate.edu> wrote:
Is there a way to iterate over the elements in a folder other than dtml-in? Maybe by using python for loops?
dtml is a _reporting_ language. Its good at transforming an object model into an html view of those objects. Its particularly good when the structure of your object database corresponds to the structure of your view. Its easy to fall into the trap of trying to make that transformation too complex. (My main project is just beginning to feel the weight of that problem now). If you need to do something more complex (and from your description I think you do) then you need a programming language, not a reporting language. I recommend that you write some python code (I missed the top of this thread, but I guess you want it in an External Method) to create some temporary objects whose structure matches what you want in your document. Finally, use simple dtml to transform this intermediate representation into html. Fot an example of this technique look at the implementation of objectValues itself. I hope this helps, Toby Dickenson tdickenson@geminidataloggers.com
participants (4)
-
Kevin Meinert -
Michel Pelletier -
Pavlos Christoforou -
Toby Dickenson