Re: NameError obwohl das Objekt angezeigt wird?

robert rottermann <[email protected]>
Newsgroups gmane.comp.web.zope.german
Organization redcor AG
Message-ID <[email protected]>
mit
> <div class="zettel"
>     tal:define="object nocall:object | nocall:here;

cann es ja sein, das die else bedingung nocall:here; zum tragen kommt.
das hat dann wohl kein getBackground
gruss
rr

Am 11.03.2010 19:00, schrieb Hartmut Goebel:
> Hallo,
> 
> ich habe einen sehr eigenartigen Fehler: Unten stehendes Snippet (eine
> Variante von Plones newsitem_view) funktioniert wie gewünscht. Wenn ein
> Bild vorhanden ist, dann wird es angezeigt. (Ebenso der Text, das habe
> ich hier weg gelassen.)
> 
> <div class="zettel"
>     tal:define="object nocall:object | nocall:here;
> 	     text python:object.CookedBody(stx_level=2);"
> 	 tal:attributes="class string:zettel ${object/getBackground};">
>   <img tal:replace="structure python: object.tag(scale='thumb')"
>        src="" alt=""
>        tal:condition="object/image_thumb"/>
> </div>
> 
> Nun möchte ich das Image nur anzeigen, wenn ${object/getBackground}
> einen bestimmten Wert hat. Wenn ich die condition ändere, bekomme ich
> aber plötzliche einen "NameError: 'object' not defined". Ich habe auch
> mit PathExprs herumgespielt: gleiches Ergebnis.
> 
>    tal:condition="python:object.getBackground()=='photo' and
> object.image_mini"
> 
> Ich bin mit meinem Latein am Ende. Woran kann das liegen?
> 
> 
> 
> 
> 
> 
> _______________________________________________
> zope mailing list
> [email protected]
> https://mail.dzug.org/mailman/listinfo/zope



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.