[Zope] Help with String conversion in Zope

Dennis Allison allison at sumeru.stanford.EDU
Thu Sep 4 08:18:12 EDT 2003


I'm not sure what you need -- I assume you want to do a search for Zope
objects based on their content, then do a search and replace on their
content.   The "by hand" apprach is to use the FIND tab to locate the 
objects and then edit the objects through the ZMI.  Is that right?

If that works for you, take a look at the ZopeFind method in 
lib/python/OFS/FindSupport.py.  Using that you can get a list
of (path, method) pairs of objects to be edited.  You then would 
need to write a zope method to do the actual edits.


(You probably should copy the zope list on all communications liek this 
as (1) you get input from a larger group, and (2) others can benefit from 
the collective solution to your problem.   For these reasons, I've copied 
the Zope list here.)


On Thu, 4 Sep 2003, enrica dente wrote:

> Hy  Allison,
> 
> I emailed you sometime ago. I need your help again. This time I really need 
> it. I haven't been able to find a solution that allows me to search for all 
> the <a href=/welcome links in the original pages created by Zope. How do I 
> convert these pages into a files system that I can search so that I can also 
> search and replace HTML code?
> 
> Please help me.
> 
> Enrica
> 
> 
> 
> >From: Dennis Allison <allison at sumeru.stanford.EDU>
> >To: enrica dente <enrica_dente at hotmail.com>
> >CC: zodb-dev at zope.org, zope-it at zope.org, help at zope.org, Zope at zope.org
> >Subject: Re: [Zope] Help with String conversion in Zope
> >Date: Thu, 12 Jun 2003 06:54:59 -0700 (PDT)
> >
> >
> ><dtml-if expr="_.same_type(standardkit_cost, 'Test')">
> >                ^^
> >You need to specify the name space.
> >
> >On Thu, 12 Jun 2003, enrica dente wrote:
> >
> > > Dear all,
> > >
> > > I have a problem checking if an input from a form is a string or not and
> > > then change it into a float. The Zope code I have written is as follows 
> >but
> > > it does not work.
> > >
> > > <dtml-if expr="same_type(standardkit_cost, 'Test')">
> > >    <dtml-call "REQUEST.set ('standardkit_cost', 
> >_.float(standardkit_cost))">
> > >
> > > </dtml-if>
> > >
> >
> 
> _________________________________________________________________
> Tired of 56k? Get a FREE BT Broadband connection 
> http://www.msn.co.uk/specials/btbroadband
> 




More information about the Zope mailing list