[Zope] Testing document properties
Oscar Picasso
picasso@videotron.ca
Wed, 20 Oct 1999 09:06:16 -0400
As I understand it the first if looks for an object called "caso" in the
folder in which you document is (the parent folder).
Try something like this in your DTML Method:
<dtml-in "objectValues(['Folder'])">
...your stuff
</dtml-in>
if it is a DTML Document:
<dtml-in "PARENTS[0].objectValues(['Folder'])">
...your stuff
</dtml-in>
I'm still considering myself as newbie, so chances are I'm wrong.
ps: i'm working on multilingual sites and I'm still wondering what is the
best design to solve these kind of problems. I would prefer a more object
oriented approach, but it's easy how to implemented it Zope. Maybe we could
work together in these kind of problems.
pps: De donde eres?
><dtml-if caso.idioma>
> <dtml-if "caso.idioma == 'en'">
> <h2>What is your diagnosis?</h2>
> <dtml-else>
> <h2>¿Cual es su diagnóstico?</h2>
> </dtml-if>
><dtml-else>
> <h2>¿Cual es su diagnóstico?</h2> <****
></dtml-if>
>
>I want to test if this property exists. If it exists and its value is
>"en" then print a text in English. Otherwise print it in Spanish.
>The above DTML code always returns the text marked with "<****".
>I've tried puttin the first if in double quotes like <dtml-if
>"caso.idioma"> but it fails when the document does not have this
>property.
>
******************************************************
Oscar Picasso
picasso@videotron.ca
******************************************************