[Zope] DTML to search a lines property in a DTML Document?

Daniel G. Rusch drusch@globalcrossing.com
Wed, 06 Jun 2001 09:24:55 -0500


Here you go

<dtml-in "objectItems(['DTML Document'])">
  <dtml-with sequence-item>
	<dtml-in "propertyItems()">
              	<dtml-if "_['sequence-key'] == 'Prop'">
			<dtml-comment> Put your test code here</dtml-comment>
	 		<dtml-var sequence-item><br>
		</dtml-if>
        </dtml-in>
  </dtml-with>
</dtml-in>


I made a folder and put three DTML Documents in it, they all had a
property called Prop thus the line <dtml-if "_['sequence-key'] ==
'Prop'"> (change 'Prop' to suit your needs.

HTH

Dan

complaw@hal-pc.org wrote:
> 
> > Are all of the documents in a specific folder or are they all over the
> > place???
> >
> 
> All in the same folder.
> 
> Ron
> >
> >
> > complaw@hal-pc.org wrote:
> > >
> > > Can you, using DTML, search a lines property of a DTML Document to look for
> a
> > > specific string?  I have a set of DTML Documents with a custom lines
> property
> > > (called, e.g., "doctrines") and I want to search through the list in the
> context
> > > of a conditional statement in order to filter out the DTML Documents that
> don't
> > > have a specific doctrine in the doctrines property (or list those that do).
> > >
> > > Has anyone ever done that or something similar?
> > >
> > > TIA,
> > >
> > > Ron
> > >
> > > _______________________________________________
> > > Zope maillist  -  Zope@zope.org
> > > http://lists.zope.org/mailman/listinfo/zope
> > > **   No cross posts or HTML encoding!  **
> > > (Related lists -
> > >  http://lists.zope.org/mailman/listinfo/zope-announce
> >