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. <dtml-tree urlparam="myparam=abc"> This works fine with hard coded strings. * But my string is dynamic! * How can I pass it? <dtml-tree urlparam="myparam=<dtml-var myparam>"> produced syntax-errors. Has somebody an idea, how to pass it - or how to work around the problem? Many thanks in advance, Ulla.
Have you looked at this: http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.15.html Jonathan ----- Original Message ----- From: "Ulla Theiss" <u.theiss@eurodata.de> To: "Zope Mailing List" <zope@zope.org> 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. <dtml-tree urlparam="myparam=abc">
This works fine with hard coded strings.
* But my string is dynamic! * How can I pass it?
<dtml-tree urlparam="myparam=<dtml-var myparam>"> 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 )
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" <u.theiss@eurodata.de> To: "Zope Mailing List" <zope@zope.org> 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. <dtml-tree urlparam="myparam=abc">
This works fine with hard coded strings.
* But my string is dynamic! * How can I pass it?
<dtml-tree urlparam="myparam=<dtml-var myparam>"> 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 )
On 12/8/05, Ulla Theiss <u.theiss@eurodata.de> 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
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
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, sh23@le.ac.uk Learning Technology Section, Computer Centre, University of Leicester, University Rd, Leicester, LE1 7RH Fax (0/+44)116 2525027 WWW <URL: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. <dtml-tree urlparam="myparam=abc">
This works fine with hard coded strings.
* But my string is dynamic! * How can I pass it?
<dtml-tree urlparam="myparam=<dtml-var myparam>"> 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 )
participants (5)
-
Dieter Maurer -
Jonathan -
Martijn Pieters -
S.Hayles -
Ulla Theiss