Forum OpenACS Development: Re: Current best practises: Dynamic Attributes, Package Linking, Callbacks

After some discussion with the OCT I think the best way to add a file storage folder or any other object to a project is as follows:
  1. In the parameter section of project manager define what object types instances (e.g. a forum) should be generated along with the project. You could use the object type and the package_id where the object should be generated at (or just use the closes anchestor). Preferably we could do this in a general way that would allow the generic linking of packages and is not specific to project manager (e.g. by adding a "object-link" package that also stores the sort order for display)
  2. After adding the project, create all other object type instances (using callbacks ?) and
    • Relate the new object_id to the project_id using acs-rels (and not by an extension using dynamic types).
    • Set the context_id to the project_id for the new objects
  3. When you display the default page for the project manager include the other objects by displaying their default include that displays the object (something like th /o functionality). This needs the following things:
    • Each package we want to include needs to have a default include that is able to display the object type.
    • The default include's name needs to be registered with the object type (additional column ?). In the long run this should be changeable, so you could define to use a different default template in the install.xml.
    • In the project view page there needs to be a "hook" to display all related objects using their default include.
As we are under some time constraints, we will make our life easier though and only deal with forums and file-storage as objects to add to the PM and add them fixed to the PM pages (instead of using the hook method).

This approach also has the beauty of the ability to use the portal package instead of the current page with includes, if I only knew how to create a page with the portal package in the first place. It would also be cool if we could get the portal package to accept a parameter that this page can not be changed by the user. But this is a different topic.