Re: Bestimmten Content-Typ im aktuellen Verzeichnis finden

Hartmut Goebel <[email protected]>
Newsgroups gmane.comp.web.zope.german
Organization Goebel Consult
Message-ID <[email protected]>
Hartmut Goebel schrieb:

> Das funktioniert leider nicht, wenn der context z.B. ein "Document" ist.
> In diesem Fall soll "MeinArtikel" natürlich im Folder gesucht werden.
> Daher ja der letzte Fall mit dem aq_parent

Ich habe nun eine Lösung gefunden.

Diese funktioniert *nicht*
<div
 tal:define="
   folderish here/isPrincipiaFolderish | python:0;
   qm python:test(folderish, context.getFolderContents,
context.aq_parent.getFolderContents);
">

Diese funktioniert:

<div
 tal:define="
   folderish here/isPrincipiaFolderish | python:0;
   qm python:test(folderish, context, context.aq_parent).getFolderContents;
">


Das würde aber bedeuten, dass der "default"-Teil der Funktion test()
immer ausgewertet wird. *Argl* Ja, klar! Ist ja eine einnormale
Python-Funktion mit call-by-value. So ein doofer Fehler sollte mich
eigentlich nicht passieren :-(

-- 
Schönen Gruß - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult mit Mitglied bei http://www.7-it.de



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
smime.p7s (application/x-pkcs7-signature, 4.6 KB) - not displayed
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.