Forum OpenACS Development: Re: Virtual urls in CR / File Storage

Collapse
Posted by Don Baccus on
Yeah, something like Jun's approach sounds like a reasonable one.

The CR provides the ability to attach a template to a content type or content item (which overrides the type's template, which is treated like a default in other words.)

I don't know if it makes sense to use the content folder's template on a content item, though ... because a content folder's template ought to be written to render the folder itself not normal content.

So offhand I think the hierarchy content_item->content_type->generic default makes sense.

You can see where this is headed ... a bunch of display code in file storage, its portlets, etc could be generalized to be attached to the CR itself using the CR's template mechanism.  The folder-chunk template could be reduced to calling some CR API to blend the folder with its template.  Changing the look and feel of folder display for folders in a particular package then just becomes a matter of associating a new template with that package's folder items rather than writing new code.

We want to be conservative in our expectations for OpenACS 5.0 but preliminary pushes in this direction (if people think it makes sense) could probably be implemented in the two-three month window we have available.

Thoughts?