Hi, Are there some sites which publish there DTML source(structure)? I'm particulary looking on how several navigation, menu, ... structures are implemented in Zope. On Zope.org you can see the DTML-source. Unfortunately not the implementation of the navigation (or the menu on the left). Tom.
Hi Tom, There's a package for Zope called ZNavigation. I use it. It's very nice once you understand the basics. It's not very hard to use but it is a bit intimidating at first. I can't think of the link on top of my head but if you can't find it, get back to me, I'll do what I can to find it. HTH Dany -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Tom Deprez Sent: Thursday, November 23, 2000 8:39 AM To: zope@zope.org Subject: [Zope] DTML source Hi, Are there some sites which publish there DTML source(structure)? I'm particulary looking on how several navigation, menu, ... structures are implemented in Zope. On Zope.org you can see the DTML-source. Unfortunately not the implementation of the navigation (or the menu on the left). Tom. _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Just don't put two of it into a page. You can have this problem when you use frame sometimes. Dany Rioux wrote:
Hi Tom,
There's a package for Zope called ZNavigation. I use it. It's very nice once you understand the basics. It's not very hard to use but it is a bit intimidating at first. I can't think of the link on top of my head but if you can't find it, get back to me, I'll do what I can to find it.
HTH
Dany
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Tom Deprez Sent: Thursday, November 23, 2000 8:39 AM To: zope@zope.org Subject: [Zope] DTML source
Hi,
Are there some sites which publish there DTML source(structure)? I'm particulary looking on how several navigation, menu, ... structures are implemented in Zope.
On Zope.org you can see the DTML-source. Unfortunately not the implementation of the navigation (or the menu on the left).
Tom.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hmmm... Good point. I don't use frames so I never encountered that behavior/bug/feature :) but on non-frames it does wonders. I really like the way it can be used and it's easy to modify. Dany
-----Original Message----- From: Chalu Kim [mailto:chalu@egenius.com] Sent: Thursday, November 23, 2000 3:11 PM To: Dany Rioux Cc: Tom Deprez; Zope Mailing List Subject: Re: [Zope] DTML source
Just don't put two of it into a page. You can have this problem when you use frame sometimes.
Dany Rioux wrote:
Hi Tom,
There's a package for Zope called ZNavigation. I use it. It's very nice once you understand the basics. It's not very hard to use but it is a bit intimidating at first. I can't think of the link on top of my head but if you can't find it, get back to me, I'll do what I can to find it.
HTH
Dany
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Tom Deprez Sent: Thursday, November 23, 2000 8:39 AM To: zope@zope.org Subject: [Zope] DTML source
Hi,
Are there some sites which publish there DTML source(structure)? I'm particulary looking on how several navigation, menu, ... structures are implemented in Zope.
On Zope.org you can see the DTML-source. Unfortunately not the implementation of the navigation (or the menu on the left).
Tom.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi! On Thu, 23 Nov 2000, Tom Deprez wrote:
Are there some sites which publish there DTML source(structure)? I'm particulary looking on how several navigation, menu, ... structures are implemented in Zope.
On Zope.org you can see the DTML-source. Unfortunately not the implementation of the navigation (or the menu on the left).
Russian Python and Zope User Group site: http://zope.net.ru/ The problem is that it is really in russian (surprized? :) Horizontal navigation implemented in header, in method global-nav: http://zope.net.ru/global-nav/view_source Vertical navigation in left column implemented with External Method. Source will be freely available upon request (on first request I just put the source on the site). External Method requires 'cause I need to play with aqcuisition, recursion, etc - hardly achivable with DTML scripting. Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
At 11/23/00 01:38 PM, Tom Deprez wrote:
Are there some sites which publish there DTML source(structure)? I'm particulary looking on how several navigation, menu, ... structures are implemented in Zope.
I use the following DTML Method (probably shouldn't be done in dtml) to produce a vertical, indented menu where folders are expanded to subfolders only if you're in one of the subfolders. Three custom folders are used to build the site (Category-Top, Category-Middle, and Category-Bottom). Each folder has a menu_entry property. A folder appears in the menu only if its menu_entry is non-blank. If you are currently in Pop Culture/Reviews/Books, the menu looks like this: Ask the Experts College Pop Culture Quiz Reviews Books Movies Music Trends Sports Here's the dtml. It's called display_menu and is recursive. Replace home_id_here with the id of the site's base folder. The base folder does not appear in the menu display. <dtml-unless topdown> <dtml-call "REQUEST.set('topdown',[])"> <dtml-call "REQUEST.set('homefound','n')"> <dtml-in PARENTS skip_unauthorized> <dtml-if "homefound == 'n'"> <dtml-call "topdown.insert(0, _['sequence-item'])"> <dtml-if "_['sequence-item'].id == 'home_id_here'"> <dtml-call "REQUEST.set('homefound', 'y')"> </dtml-if> </dtml-if> </dtml-in> <dtml-call "REQUEST.set('level', 0)"> <dtml-call "REQUEST.set('NodeToShow', topdown[0])"> </dtml-unless> <dtml-if "level > 0"> <dtml-with NodeToShow> <dtml-var "' '*3*(_.int(level)-1)"> <a href="&dtml-absolute_url;" class=toolbox>&dtml-menu_entry;</a><br> </dtml-with> </dtml-if> <dtml-if "level < _.len(topdown) and NodeToShow.id == topdown[level].id"> <dtml-in "NodeToShow.objectValues(['Category-Top','Category-Middle','Category-Bottom'])" sort=id skip_unauthorized> <dtml-if "_['sequence-item'].menu_entry"> <dtml-call "REQUEST.set('level', level+1)"> <dtml-call "REQUEST.set('NodeToShow', _['sequence-item'])"> <dtml-var display_menu> <dtml-call "REQUEST.set('level', level-1)"> </dtml-if> </dtml-in> </dtml-if> Not my finest piece of coding, but maybe it will help. -- Dennis Nichols nichols@tradingconnections.com
I know, I know. It's a little late to speak up, but I think there is a logical objection to this name: inconsistency with "DTML Method" and "ZSQL Method". I think some better options were left off the vote. ZIP Method (Zope Internal Python Method) ZoPy Method PyZo Method ZPython Method I think the name should indicate that it is a type of Zope method and that it is a type of Python function peculiar to Zope. Cheers, Chris
Chris Gray wrote:
I know, I know. It's a little late to speak up, but I think there is a logical objection to this name: inconsistency with "DTML Method" and "ZSQL Method".
These are old, horrible and will hopefully be re-thought and given different names ;-)
ZIP Method (Zope Internal Python Method) ZoPy Method PyZo Method ZPython Method
:-( All imply there is soem difference between the Python used by Zope and any other python ,which isn't, and never should be, the case... cheers, Chris
I have to agree with Chris (Gray). It is enough confusing already (for me it is that is :). I personnaly think that a name like "ZoPy Scripting" (w/ or w/o Method) should be used. My 0.02c Dany Subject: Re: [Zope] Objection to Python Script Name Chris Gray wrote:
I know, I know. It's a little late to speak up, but I think there is a logical objection to this name: inconsistency with "DTML Method" and "ZSQL Method".
These are old, horrible and will hopefully be re-thought and given different names ;-)
ZIP Method (Zope Internal Python Method) ZoPy Method PyZo Method ZPython Method
:-( All imply there is soem difference between the Python used by Zope and any other python ,which isn't, and never should be, the case... cheers, Chris
Why not just Python Script Perl Script ? Tom. At 13:17 23/11/2000 -0400, Dany Rioux wrote:
I have to agree with Chris (Gray).
It is enough confusing already (for me it is that is :). I personnaly think that a name like "ZoPy Scripting" (w/ or w/o Method) should be used.
My 0.02c
Dany
Subject: Re: [Zope] Objection to Python Script Name
Chris Gray wrote:
I know, I know. It's a little late to speak up, but I think there is a logical objection to this name: inconsistency with "DTML Method" and "ZSQL Method".
These are old, horrible and will hopefully be re-thought and given different names ;-)
ZIP Method (Zope Internal Python Method) ZoPy Method PyZo Method ZPython Method
:-(
All imply there is soem difference between the Python used by Zope and any other python ,which isn't, and never should be, the case...
cheers,
Chris
Attachment Converted: "Z:\xrad002\eudora\Attachments\smime11.p7s"
I know the subject is closed (or is it really???) but I have to say that a name like Python Script or Perl Script sounds to me like any scripting not associated with a product and that's why I have to agree with Chris Gray. If I would see an addon telling me it's a Python Scritp I wouldn't even think of using it and I frankly would wonder what it does on Zope. Maybe I'd think it'd have to do with Zope a long way off... Maybe it all stems from my newbie status but it would sounds confusing to me. Dany
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Tom Deprez Sent: Thursday, November 23, 2000 2:04 PM To: Zope Mailing List Subject: RE: [Zope] Objection to Python Script Name
Why not just
Python Script Perl Script
?
Tom.
At 13:17 23/11/2000 -0400, Dany Rioux wrote:
I have to agree with Chris (Gray).
It is enough confusing already (for me it is that is :). I personnaly think that a name like "ZoPy Scripting" (w/ or w/o Method) should be used.
My 0.02c
Dany
Subject: Re: [Zope] Objection to Python Script Name
Chris Gray wrote:
I know, I know. It's a little late to speak up, but I
think there is a
logical objection to this name: inconsistency with "DTML Method" and "ZSQL Method".
These are old, horrible and will hopefully be re-thought and given different names ;-)
ZIP Method (Zope Internal Python Method) ZoPy Method PyZo Method ZPython Method
:-(
All imply there is soem difference between the Python used by Zope and any other python ,which isn't, and never should be, the case...
cheers,
Chris
Attachment Converted: "Z:\xrad002\eudora\Attachments\smime11.p7s"
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Greetings to the Knights-Who-Until-Recently-Said-Python-Methods, On Thu, 23 Nov 2000, Chris Withers wrote:
Chris Gray wrote:
I know, I know. It's a little late to speak up, but I think there is a logical objection to this name: inconsistency with "DTML Method" and "ZSQL Method".
These are old, horrible and will hopefully be re-thought and given different names ;-)
Granted. My objection doesn't really apply if the naming of all the standard Zope object classes is up for grabs. If that's where things are headed then it would probably be a good idea to have a set of guidelines for the naming of parts of Zope. Zope should underline its OO nature with consistent naming of related things.
ZIP Method (Zope Internal Python Method) ZoPy Method PyZo Method ZPython Method
:-(
All imply there is soem difference between the Python used by Zope and any other python ,which isn't, and never should be, the case...
But there is a difference for the internal methods (restrictions on security and builtins), as well as similarities with other Zope methods (the way you call it from DTML or via URL). I was thinking of the analogy with ZSQL. BTW, can you use DTML tags in Python Script the same way you use them in ZSQL methods? Cheers, Chris
But there is a difference for the internal methods (restrictions on security and builtins), as well as similarities with other Zope methods (the way you call it from DTML or via URL). I was thinking of the analogy with ZSQL.
BTW, can you use DTML tags in Python Script the same way you use them in ZSQL methods?
NO!!!!! Did you honestly need to ask that, or where you cracking a joke? -Andy
Well, half-and-half (joking/serious, that is). I was in a speculative mood about the extent of the analogies among the different kind of methods. Actually the idea makes a little more sense to me on second thought than it did at first blush. Being able to build a Python Script on the fly might have its advantages. Is eval() allowed in restricted scripts? If not, DTML tags in restricted scripts might make sense. Chris On Thu, 23 Nov 2000, Andy Dawkins wrote:
BTW, can you use DTML tags in Python Script the same way you use them in ZSQL methods?
NO!!!!!
Did you honestly need to ask that, or where you cracking a joke?
On Thu, 23 Nov 2000, Chris Withers wrote:
Chris Gray wrote:
I know, I know. It's a little late to speak up, but I think there is a logical objection to this name: inconsistency with "DTML Method" and "ZSQL Method".
These are old, horrible and will hopefully be re-thought and given different names ;-)
Ouch ;) I had already made my point when the last poll was taking place. Renaming the XY Methods will break all documentation, how-tos, snippets, whatever. After all the traffic the mismatch of the ZB and non-CVS Python Methods has created, I really do not want to even imagine the flood of "My system does not have XY Methods" posts. Hey, we are still using things like bobobase_modification_time... Stefan
----- Original Message ----- From: Stefan H. Holek <stefan@epy.co.at>
On Thu, 23 Nov 2000, Chris Withers wrote: I had already made my point when the last poll was taking place. Renaming the XY Methods will break all documentation, how-tos, snippets, whatever. After all the traffic the mismatch of the ZB and non-CVS Python Methods has created, I really do not want to even imagine the flood of "My system does not have XY Methods" posts.
Stefan, Yes this is still a good point.. But pragmatically, it seems like 'Python Scripts' is now President [unless major riots, appeals and insurgency follow..] However, I hope to god that Someone 1. Will put post some clear glossary-dictionary explanation or translation tables at zope.org to help Zope newbies and others relate the terminology of 'Python Scripts' vs. 'XY Methods' etc. 2. Fixes the OReilly book in some sensible manner - add highly legible note on Page 1, update the index in useful manner to catch the differences. 3. Will explain to me 100% clearly what difference there is now between a regular Python script and a 'Python Script' in Zope? Thanks - Jason [who though 'Python ZMethods' was good]
Jason Cunliffe wrote:
2. Fixes the OReilly book in some sensible manner - add highly legible note on Page 1, update the index in useful manner to catch the differences.
Oh I'll be doing that one, no worries there.
3. Will explain to me 100% clearly what difference there is now between a regular Python script and a 'Python Script' in Zope?
There is no such thing as a "script" in the Python language (see the index of the "language reference" on the python site, you will find "method" and "module" but not "script"). "Script" is just a word that is informally and commonly used to refer to a chunk of code written in some language on some platform that is invoked by some action, possibly from a "command line" or by double clicking on an icon. In the case of a Zope Python Script, the code is written in python, the platform is Zope, and the "command line" is your web browser. -Michel
Michel Pelletier wrote:
Jason Cunliffe wrote:
2. Fixes the OReilly book in some sensible manner - add highly legible note on Page 1, update the index in useful manner to catch the differences.
Oh I'll be doing that one, no worries there.
3. Will explain to me 100% clearly what difference there is now between a regular Python script and a 'Python Script' in Zope?
There is no such thing as a "script" in the Python language (see the index of the "language reference" on the python site, you will find "method" and "module" but not "script"). "Script" is just a word that is informally and commonly used to refer to a chunk of code written in some language on some platform that is invoked by some action, possibly from a "command line" or by double clicking on an icon. In the case of a Zope Python Script, the code is written in python, the platform is Zope, and the "command line" is your web browser.
Connotatively, scripting rings the same meaning as ASP scripting, ColdFusion scripting, PHP scripting, JSP scripting... How is Python script different from them? But Python script isn't "SCRIPTING" in that sense of the word.
-Michel
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (11)
-
Andy Dawkins -
Chalu Kim -
Chris Gray -
Chris Withers -
Dany Rioux -
Dennis Nichols -
Jason Cunliffe -
Michel Pelletier -
Oleg Broytmann -
Stefan H. Holek -
Tom Deprez