[Zope] Creating Factory Objects (Products)

Pierre Rougier prougier@ina.fr
Tue, 18 Jul 2000 11:22:21 +0200


Hi Fire,
This should work:

-Create a new product (here InstantSiteProduct) (from here, your product can be
accessed through the "Add" list)
-In this product, add a Z Class (name it Instant Site)
-In this ZClass, create your DTML methods (Designer and Builder)

If u need to store properties in the Product, create a propertysheet in this Z
Class.
U will be able to access these properties from your product methods by using
   "<dtml-var propertysheets.your_property >"

and, if u want to change the properties in your methods, use

<dtml-call propertysheets.your_property.manage_changeProperties(
prop1=val1,....,propn=valn)>

One more thing: all your changes on the product modify all the instances of your
product...

These things should work....
Hope this help

Pierre :)

> I'm following the tutorial in Zope Content Manager's Guide. I created an
> 'InstantSite' product, with 2 DTML methods, Designer and Builder. I followed
> most of the instructions, and managed to see the product in my 'Add List'.
> But when i tried to add it into my other folders, the Builder page(which
> would be called after Designer) could not be accessed. The error is:
>
> "Resource not found
>
> Sorry, the requested Zope resource does not exist.
> Check the URL and try again." followed by the tracebacks...
>
> In fact, the tutorial doesn't seem comprehensive and contain errors(e.g.
> screenshots different from description). Could anyone give this newbie some
> pointers here? TIA.
>
> regards,
> Firestar