[Zope] New user: Z Class questions

Jim Washington jwashin@vt.edu
Sat, 08 Apr 2000 11:25:02 -0400


Hi, Ed

Ed Hitchcock wrote:
> 
>         I'm starting to get the hang of it, but there are still a few things I'm having trouble sorting out.  Basically what I'm
> trying to do is create a nested set of objects for a class web site.  The objects are a Course Folder, which contains Unit
> Folders, which contains Lesson Sheets.  Using this, any teacher can put up a class website with a common interface by
> simply pasting lext into the lesson sheets.
>         What I did was to create the Course Folder class based on the folder base class, the Unit Folder based on
> the Folder base class, and the Lesson Sheet base class based on the DTML Document base class. I created the
> lesson Sheet class inside the UnitFolder Class inside the Course Folder class.  Now I want to add additional properties
> to the classes, like TeacherName and Textbook to the course folder, UnitName, OrderNumber (for sorting purposes)
> for the unit folder, and LessonName, ChapterReference, orderNumber, etc for the lesson folder.

When you get it working, I would like to see your Product.  It sounds
useful.
 
>         My questions:
>         1.  How do I add these properties to the classes?  The Property Sheets seems to be something different, at
> least adding property sheets doesn't addd properties to instances, and

You are probably missing adding a "view" of the property sheet.  In your
ZClass, go to "Views" and add something like "Class_Info". Pull down the
select list to find the "propertysheets/[PropertySheetName]/manage"
method.  This will add a management tab with the property sheet to your
instances.

>         2.  Why do my UnitFolder and Lesson Sheet objects not show up in the Add List inside a Course Folder
> instance like it says they should in the ZDG?

If your courseFolder ZClass is folderish, there should be a tab called
"Subobjects" where you can select the things that should appear in its
Add list.  If the things you want are not there, those classes might
need to be created at the root of your Product's folder.  In my
experience ZClass-within-a-ZClass objects are best added
programmatically at this time, and do not appear on the global Add list,
which I think the choice list of "Subobjects" uses.  I presume somebody
will correct me if I am wrong about this.

hth,

-- Jim Washington