How can I get context property in DTML ? (example)
Hello, In DTML I would like to do that : I've this directory : dir1 |---- dir2 |---- dir3 "dir1" has property bar=1 "dir2" has property bar=2 "dir3" has property bar=3 I would like a "foo_html" DTML Document file which display the property bar. This file is place in dir1. Exemple : When I go to dir1/foo_html => I show 1 When I go to dir1/dir2/foo_html => I show 2 When I go to dir1/dir3/foo_html => I show 3 How can I do it ? Thanks for your help. -- Stéphane
Yellow, Just place an index_html object inside dir1 with this code: <dtml-var bar> Then call the following URL's: http://yourserver/dir1/ http://yourserver/dir2/ http://yourserver/dir3/ Regards hr On 5/23/05, KLEIN Stéphane <stephane@harobed.org> wrote:
Hello,
In DTML I would like to do that :
I've this directory :
dir1 |---- dir2 |---- dir3
"dir1" has property bar=1 "dir2" has property bar=2 "dir3" has property bar=3
I would like a "foo_html" DTML Document file which display the property bar. This file is place in dir1.
Exemple :
When I go to dir1/foo_html => I show 1 When I go to dir1/dir2/foo_html => I show 2 When I go to dir1/dir3/foo_html => I show 3
How can I do it ?
Thanks for your help. -- St�hane
_______________________________________________ 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 )
-- Hugo Ramos - ramosh@gmail.com
Sorry... Forgot to say that the index_html obect should be a DTML Method!!! Regards hr ---------- Forwarded message ---------- From: Hugo Ramos <ramosh@gmail.com> Date: May 23, 2005 9:44 AM Subject: Re: [Zope] How can I get context property in DTML ? (example) To: zope@zope.org Yellow, Just place an index_html object inside dir1 with this code: <dtml-var bar> Then call the following URL's: http://yourserver/dir1/ http://yourserver/dir2/ http://yourserver/dir3/ Regards hr On 5/23/05, KLEIN Stéphane <stephane@harobed.org> wrote:
Hello,
In DTML I would like to do that :
I've this directory :
dir1 |---- dir2 |---- dir3
"dir1" has property bar=1 "dir2" has property bar=2 "dir3" has property bar=3
I would like a "foo_html" DTML Document file which display the property bar. This file is place in dir1.
Exemple :
When I go to dir1/foo_html => I show 1 When I go to dir1/dir2/foo_html => I show 2 When I go to dir1/dir3/foo_html => I show 3
How can I do it ?
Thanks for your help. -- St�hane
_______________________________________________ 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 )
-- Hugo Ramos - ramosh@gmail.com -- Hugo Ramos - ramosh@gmail.com
Am Montag, den 23.05.2005, 10:37 +0200 schrieb KLEIN Stéphane:
Hello,
In DTML I would like to do that :
I've this directory :
dir1 |---- dir2 |---- dir3
"dir1" has property bar=1 "dir2" has property bar=2 "dir3" has property bar=3
I would like a "foo_html" DTML Document file which display the property bar. This file is place in dir1.
Exemple :
When I go to dir1/foo_html => I show 1 When I go to dir1/dir2/foo_html => I show 2 When I go to dir1/dir3/foo_html => I show 3
How can I do it ?
If foo_html is a DTML Method (Method, not Document!) its just: <dtml-var bar> (And god knows where the bar come from ;) <dtml-var expr="getProperty('bar')"> could work too and would be more explicit. -- Tino Wildenhain <tino@wildenhain.de>
Tino Wildenhain a écrit :
Am Montag, den 23.05.2005, 10:37 +0200 schrieb KLEIN Stéphane:
Hello,
In DTML I would like to do that :
I've this directory :
dir1 |---- dir2 |---- dir3
"dir1" has property bar=1 "dir2" has property bar=2 "dir3" has property bar=3
I would like a "foo_html" DTML Document file which display the property bar. This file is place in dir1.
Exemple :
When I go to dir1/foo_html => I show 1 When I go to dir1/dir2/foo_html => I show 2 When I go to dir1/dir3/foo_html => I show 3
How can I do it ?
If foo_html is a DTML Method (Method, not Document!) its just: <dtml-var bar>
(And god knows where the bar come from ;) <dtml-var expr="getProperty('bar')"> could work too and would be more explicit.
Thanks you. The tips was DTML Method. -- Stéphane
participants (3)
-
Hugo Ramos -
KLEIN Stéphane -
Tino Wildenhain