[Zope] YA newbie question (hey, I'm learning!)

Kirk Strauser kirk@strauser.com
17 Oct 2001 16:54:10 -0500


Hello again, all.

I am building a site that has many pages which are totally identical, with
the exception of the database query that generates their contents.  My idea
was to create this hierarchy:

Site/
  Listings/
      index_html (DTML doc)
      getContents (SQL method - a default that gets *all* possible content)
    SubListing1/
        getContents (SQL method - specific for listing #1)
    SubListing2/
        getContents (SQL method - specific for listing #2)
    ...

That way, I could go to http://site.com/Listings/SubListing1 and see the
standard index_html but with only the contents related to SubListing1.

The problem I'm encountering is that my plan works well *as long as* there
is no getContents method in the Listings/ directory.  While this makes sense
in a way, I was under the impression that SubListing1/getContents would take
precedence.  Is there a way to make it do so?  I'd prefer to actually leave
Listings/getContents in place as a fail-safe default value if at all
possible.

On a related note, I'd like to specify certain properties to be accessed in
the index_html document (page title, one-line summary, etc.), and have those
properties unique to each SubListing, with a set of defaults defined for
everything in Listings.  Is this possible?  If so, where can I set those?
Once again, anything I have defined in Listings seems to overwrite the
values I define in SubListings, although I had expected it to be the other
way around.

Many thanks,
-- 
Kirk Strauser