Forum OpenACS Q&A: Response to Advice Sought from Experienced ACS'er (CR)

Collapse
Posted by Dave Bauer on
Simon,

You can store the template information in the CR with the main item. Then the rest of the content can be child items to that one. Use the cr_item_template_map. This can also have a use_context which defines a template depending on how a content item is being "used". You can also define templates per content_type, but in your case, per item is better.

Next you can use an index.vuh to read in the template name and do
ad_return_template $template_name

or probably more likely rp_internal_redirect because you will need to
process the tcl file associated with the content template you are returning.

This way the URL would not have to contain information about which template is to be returned, that is stored with the content item.

In each template's tcl file you have code the pulls out all the various pieces into tcl variables, and then assemble them in the adp.

It's kinda early, does this make any sense?