URL parameters and Dtml var
Im having some trouble on using URL parameters in zope. What I'm doing: I put in the browser: http://xxxxxxxxxxx.com/document?param=3Dtestpage Then in the 'document' page I have the following code: <dtml-var param> Then, what I get in the browser is the strin "testpage", instead of what = I wanted, wich would be the content of the 'testpage' document. How can I make the content of test page appear?? Thanks a lot
On Tue, 31 Jul 2001, Alexandre Aguiar wrote:
Im having some trouble on using URL parameters in zope.
What I'm doing:
I put in the browser: http://xxxxxxxxxxx.com/document?param=3Dtestpage
Then in the 'document' page I have the following code: <dtml-var param>
Then, what I get in the browser is the strin "testpage", instead of what = I wanted, wich would be the content of the 'testpage' document.
How can I make the content of test page appear??
xxxxxxxxxxxx.com. That must be a really pornographic site, right? Try <dtml-var "_[param]">. -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
Alexandre, You are passing testpage as a string in your URL. So, in your 'document' page, you need to tell Zope to get the testpage object. You have several options, depending on what you want to do. I'm assuming that you want to render the content of the testpage object. If that is the case, you can use either: <dtml-var expr="_.getitem('testpage', 1)"> or <dtml-var expr="_[param]"> Now, if you just want to display the content of the object, but NOT render it, you can use: <dtml-var expr="_.getitem('testpage')"> or <dtml-var expr="_.getitem('testpage', 0)"> The 0 or 1 in the above examples define whether you want to render the object. 0 = no 1 = yes hth, Tommy Innovation: The Best Way To Predict The Future ... Is To Create It.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Alexandre Aguiar Sent: Tuesday, July 31, 2001 11:43 AM To: zope@zope.org Subject: [Zope] URL parameters and Dtml var
Im having some trouble on using URL parameters in zope.
What I'm doing:
I put in the browser: http://xxxxxxxxxxx.com/document?param=3Dtestpage
Then in the 'document' page I have the following code: <dtml-var param>
Then, what I get in the browser is the strin "testpage", instead of what = I wanted, wich would be the content of the 'testpage' document.
How can I make the content of test page appear??
Thanks a lot
_______________________________________________ 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 )
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Tommy Johnson Sent: Tuesday, July 31, 2001 3:14 PM To: Zope List Subject: RE: [Zope] URL parameters and Dtml var Alexandre, You are passing testpage as a string in your URL. So, in your 'document' page, you need to tell Zope to get the testpage object. You have several options, depending on what you want to do. I'm assuming that you want to render the content of the testpage object. If that is the case, you can use either: <dtml-var expr="_.getitem('testpage', 1)"> or <dtml-var expr="_[param]"> Now, if you just want to display the content of the object, but NOT render it, you can use: <dtml-var expr="_.getitem('testpage')"> or <dtml-var expr="_.getitem('testpage', 0)"> The 0 or 1 in the above examples define whether you want to render the object. 0 = no 1 = yes hth, Tommy Innovation: The Best Way To Predict The Future ... Is To Create It.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Alexandre Aguiar Sent: Tuesday, July 31, 2001 11:43 AM To: zope@zope.org Subject: [Zope] URL parameters and Dtml var
Im having some trouble on using URL parameters in zope.
What I'm doing:
I put in the browser: http://xxxxxxxxxxx.com/document?param=3Dtestpage
Then in the 'document' page I have the following code: <dtml-var param>
Then, what I get in the browser is the strin "testpage", instead of what = I wanted, wich would be the content of the 'testpage' document.
How can I make the content of test page appear??
Thanks a lot
_______________________________________________ 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 )
_______________________________________________ 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 )
The underscore is a rather strange notation for the current namespace. This should include the current context somewhere near the top. (Doubtless the underscore has some historical reason for existence. But I still count it as strange: "What's the name of the current namespace?" "_" "Obviously.") --jcc (on the top)
participants (5)
-
Alexandre Aguiar -
J. Cameron Cooper -
Joel Burton -
Mate' Sztipanovits -
Tommy Johnson