[Zope] URL parameters and Dtml var
Tommy Johnson
tommy@7x.com
Tue, 31 Jul 2001 12:14:09 -0800
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 )