[Zope] DMTL-IF: Listing Documents that contain queryword

Sean Lee sean at erexi.com.tw
Sat Nov 22 13:13:46 EST 2003


I manually set Document Properties for files that I want to list in
groups. Each Document has a Property "category"; to get Category One
docs, I use
<dtml-in "my_documents.objectValues()"> 
<dtml-if "category=='Category One'">
<dtml-comment>List Documents</dtml-comment>
</dtml-if>
</dtml-in>

Since Documents already have the word I need in dtml-var Title (Category
One: Whatever Title), I'd like to use a Web form to pass the query
string and get rid of having to manually set Properties for each
Document.
I'd like to list any Document that contains string "query", like: 
"select Documents where <dtml-var title> like queryword"

Can someone help me with this? If possible, I'd like to accomplish this
in Zope without external scripts programming languages.

Env: Zope 2.5.x, Python 2.2.x

Thanks
Sean



More information about the Zope mailing list