Re: [Zope] dtml-tree (urlparam)
This patch provides an extension: http://www.zope.org/Members/jfarr/Patches/dtml-tree I haven't yet tried it on 2.8.x but it worked with 2.7.x Steven Steven Hayles - Computer Systems Developer, [EMAIL PROTECTED] Learning Technology Section, Computer Centre, University of Leicester, University Rd, Leicester, LE1 7RH Fax (0/+44)116 2525027 WWW http://www.le.ac.uk/home/sh23> On Wed, 7 Dec 2005, Ulla Theiss wrote: Dear list, I have a problem using dtml-tree. The page which contains a dtml-tree should show a dynamic parameter, passed with to url calling the dtml-tree-page. page_with_dtml_tree?myparam=yup Before expanding or collapsing the tree, everything works fine. But if I expand or collapse it, this parameter is forgotten. I found the dtml-tree-parameter urlparam, which is included in the expanding and collapsing widget links. This works fine with hard coded strings. * But my string is dynamic! * How can I pass it? produced syntax-errors. Has somebody an idea, how to pass it - or how to work around the problem? Many thanks in advance, Ulla. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-tree (urlparam)
Ulla Theiss wrote at 2005-12-8 10:55 +0100: >many thanks for the link to a little bit more documentation of >dtml-tree. Unfortunately the parameter of interest (urlparam - Since >Zope 2.2??) is not mentioned there. > >Meanwhile I found in the "Zope-Bible" (Chapter 4, Page 115): "The use of >this attribute [urlparam] is somewhat limited because Zope simply passes >along whatever string you specify as the value for the urlparam >attribute. Expressions, and therefore the dynamic insertion of >variables, are not possible with this attribute under the current >version of Zope." ;-( > >The first question is clear now, but the second one becomes more and >more important: > >Does anybody have an idea to work around the problem? Someone implemented an "urlparam_expr" extension and donated it to Zope by putting it into the old collector. But the old collector broke and its content was lost... Maybe, a mail archive search can still locate the extension for you. If not, it is not difficult to create the extension again (you would follow the example of the other "*_expr" implementations). Maybe, this time, such an extension could be successfully integrated into Zope? -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-tree (urlparam)
On 12/8/05, Ulla Theiss <[EMAIL PROTECTED]> wrote: > Does anybody have an idea to work around the problem? Use the Tree classes of ZTUtils instead; much more flexibility and control. There is a price to pay though; there isn't much (if any) documentation for that package other than the code. -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-tree (urlparam)
Dear list, many thanks for the link to a little bit more documentation of dtml-tree. Unfortunately the parameter of interest (urlparam - Since Zope 2.2??) is not mentioned there. Meanwhile I found in the "Zope-Bible" (Chapter 4, Page 115): "The use of this attribute [urlparam] is somewhat limited because Zope simply passes along whatever string you specify as the value for the urlparam attribute. Expressions, and therefore the dynamic insertion of variables, are not possible with this attribute under the current version of Zope." ;-( The first question is clear now, but the second one becomes more and more important: Does anybody have an idea to work around the problem? Again, many, many thanks in advance, Ulla. Jonathan wrote: Have you looked at this: http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.15.html Jonathan - Original Message - From: "Ulla Theiss" <[EMAIL PROTECTED]> To: "Zope Mailing List" Sent: Wednesday, December 07, 2005 4:50 PM Subject: [Zope] dtml-tree (urlparam) Dear list, I have a problem using dtml-tree. The page which contains a dtml-tree should show a dynamic parameter, passed with to url calling the dtml-tree-page. page_with_dtml_tree?myparam=yup Before expanding or collapsing the tree, everything works fine. But if I expand or collapse it, this parameter is forgotten. I found the dtml-tree-parameter urlparam, which is included in the expanding and collapsing widget links. This works fine with hard coded strings. * But my string is dynamic! * How can I pass it? produced syntax-errors. Has somebody an idea, how to pass it - or how to work around the problem? Many thanks in advance, Ulla. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-tree (urlparam)
Have you looked at this: http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.15.html Jonathan - Original Message - From: "Ulla Theiss" <[EMAIL PROTECTED]> To: "Zope Mailing List" Sent: Wednesday, December 07, 2005 4:50 PM Subject: [Zope] dtml-tree (urlparam) Dear list, I have a problem using dtml-tree. The page which contains a dtml-tree should show a dynamic parameter, passed with to url calling the dtml-tree-page. page_with_dtml_tree?myparam=yup Before expanding or collapsing the tree, everything works fine. But if I expand or collapse it, this parameter is forgotten. I found the dtml-tree-parameter urlparam, which is included in the expanding and collapsing widget links. This works fine with hard coded strings. * But my string is dynamic! * How can I pass it? produced syntax-errors. Has somebody an idea, how to pass it - or how to work around the problem? Many thanks in advance, Ulla. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] dtml-tree (urlparam)
Dear list, I have a problem using dtml-tree. The page which contains a dtml-tree should show a dynamic parameter, passed with to url calling the dtml-tree-page. page_with_dtml_tree?myparam=yup Before expanding or collapsing the tree, everything works fine. But if I expand or collapse it, this parameter is forgotten. I found the dtml-tree-parameter urlparam, which is included in the expanding and collapsing widget links. This works fine with hard coded strings. * But my string is dynamic! * How can I pass it? produced syntax-errors. Has somebody an idea, how to pass it - or how to work around the problem? Many thanks in advance, Ulla. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-tree urlparam
I hacked this in already, but haven't gotten around to posting my patch. The updated TreeTag.py file is attached. Copy it to your lib/python/TreeDisplay directory. This is from a Zope 2.1.6 installation. You should use diff/patch if you've upgraded. --jfarr - Original Message - From: Júlio Dinis Silva <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 18, 2000 12:59 PM Subject: [Zope] dtml-tree urlparam > Hello all! > > Suppose I have a page who needs some dinamically generated params in order > to be rendered. > Suppose this page also has a dtml-tree. I found that to > add extra params to the url created I can use the urlparam param :-) > > But suppose instead of passing "arg=1" I want to pass > REQUEST['QUERY_STRING']. I thought urlparam would do the trick but > using urlparam=QUERY_STRING the string passed is "QUERY_STRING" instead of > the value of QUERY_STRING. > > Is there another param to do what I want or do I have to go into the > source to hack dtml-tree to force to pass my QUERY_STRING parameters? > > thanx to all, > Julio Dinis Silva > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > Share information about yourself, create your own public profile at > http://profiles.msn.com. > > > ___ > Zope maillist - [EMAIL PROTECTED] > 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 ) > ## # # Zope Public License (ZPL) Version 1.0 # - # # Copyright (c) Digital Creations. All rights reserved. # # This license has been certified as Open Source(tm). # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions in source code must retain the above copyright #notice, this list of conditions, and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright #notice, this list of conditions, and the following disclaimer in #the documentation and/or other materials provided with the #distribution. # # 3. Digital Creations requests that attribution be given to Zope #in any manner possible. Zope includes a "Powered by Zope" #button that is installed by default. While it is not a license #violation to remove this button, it is requested that the #attribution remain. A significant investment has been put #into Zope, and this effort will continue if the Zope community #continues to grow. This is one way to assure that growth. # # 4. All advertising materials and documentation mentioning #features derived from or use of this software must display #the following acknowledgement: # # "This product includes software developed by Digital Creations # for use in the Z Object Publishing Environment # (http://www.zope.org/)." # #In the event that the product being advertised includes an #intact Zope distribution (with copyright and license included) #then this clause is waived. # # 5. Names associated with Zope or Digital Creations must not be used to #endorse or promote products derived from this software without #prior written permission from Digital Creations. # # 6. Modified redistributions of any form whatsoever must retain #the following acknowledgment: # # "This product includes software developed by Digital Creations # for use in the Z Object Publishing Environment # (http://www.zope.org/)." # #Intact (re-)distributions of any official Zope release do not #require an external acknowledgement. # # 7. Modifications are encouraged but must be packaged separately as #patches to official Zope releases. Distributions that do not #clearly separate the patches from the original work must be clearly #labeled as unofficial distributions. Modifications which do not #carry the name Zope may be packaged in any form, as long as they #conform to all of the clauses above. # # # Disclaimer # # THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY # EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL CREATIONS OR ITS # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
Re: [Zope] dtml-tree urlparam
Oops. Forgot to mention, this patch adds a new param to the tree tag, 'urlparam_expr' which is a Python expression to evaluate and use as the urlparam. --jfarr - Original Message - From: Júlio Dinis Silva <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 18, 2000 12:59 PM Subject: [Zope] dtml-tree urlparam > Hello all! > > Suppose I have a page who needs some dinamically generated params in order > to be rendered. > Suppose this page also has a dtml-tree. I found that to > add extra params to the url created I can use the urlparam param :-) > > But suppose instead of passing "arg=1" I want to pass > REQUEST['QUERY_STRING']. I thought urlparam would do the trick but > using urlparam=QUERY_STRING the string passed is "QUERY_STRING" instead of > the value of QUERY_STRING. > > Is there another param to do what I want or do I have to go into the > source to hack dtml-tree to force to pass my QUERY_STRING parameters? > > thanx to all, > Julio Dinis Silva > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > Share information about yourself, create your own public profile at > http://profiles.msn.com. > > > ___ > Zope maillist - [EMAIL PROTECTED] > 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 ) > ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] dtml-tree urlparam
Hello all! Suppose I have a page who needs some dinamically generated params in order to be rendered. Suppose this page also has a dtml-tree. I found that to add extra params to the url created I can use the urlparam param :-) But suppose instead of passing "arg=1" I want to pass REQUEST['QUERY_STRING']. I thought urlparam would do the trick but using urlparam=QUERY_STRING the string passed is "QUERY_STRING" instead of the value of QUERY_STRING. Is there another param to do what I want or do I have to go into the source to hack dtml-tree to force to pass my QUERY_STRING parameters? thanx to all, Julio Dinis Silva _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. ___ Zope maillist - [EMAIL PROTECTED] 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 )