[Zope] How do I create a folder full of "virtual" DTML objectsfrom records in a database records in a database

Chris Beaumont cbeaumon@msri.org
Thu, 24 Aug 2000 16:49:43 -0700


David,

Thank you, I've been successful in setting up basic SQL methods, data
input forms and query forms,
the problem Ive been having is in trying to break each table record (one
row in a table, say) out into a separate DTML document.. with fields in
the record forming the parts of the document..  (I'm making a web
heirarchy of events which each have to have their own page with various
kinds of constantly changing information about the event on them.. 
These pages have to live at relatively stable URLs.. (of course, it
doesnt matter if they are physical documents to a search engine..)

So far what Ive seen in the ZSQL Methods guide are lots of hints on how
to use SQL methods to build tables from my data, and how to build
interfaces to use a given SQL query to filter those tables by content.. 
Which is great if you want lots of lists..

What I want to build are lists *and their linked documents*  the
records' fields flowing into  the meta tags and body text of many
individual objects. When a record is deleted from the source SQL table,
I want to be able to have that deletion propagate to the child
document..

Is a valid approach to iterate through all of the rows of the table,
taking one field of the individual record and using that to deliniate
the "ID" of the generated document, then writing the others out as HTML
through dtml-var tags?  

I know this seems like a stupid question, but it seems as if this is
such a common need that I cant help but feel that one of the available
products would address it. If one doesnt exist then yes, I'll have to
figure it out myself.. I've seen similar things done in some Zope
products.. so I know it can be done... What I was hoping for is for some
suggestions on the best way to go about it that didnt require me
figuring it out from scratch....  

Thank you



"R. David Murray" wrote:
> 
> On Wed, 23 Aug 2000, Chris Beaumont wrote:
> > I need to take rows in an SQL database table, and create one or
> > several nested folders of web pages out of them..
> 
> I'd suggest checking out the ZSQL Methods manual, and then asking any
> questions that you still have (and there probably will be some!)
> 
>