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

Collapse
Posted by Jun Yamog on
Hi Ola,

I have something similar on the CMS I am working on.  It does use the template on CR like the CR index.vuh file.  But if it fails to find one it looks for the template of the folder (parent_id).  If it still fails it will return a default template.

Here is the code, although that code is likely broken right now.

http://cvs.openacs.org/cvs/openacs-4/contrib/packages/bcds/www/templates/default.tcl?rev=1.1&content-type=text/x-cvsweb-markup

Also I think CR has some basic API to reach what cr_get_live_revision_from_url it trying to achieve.  You can use content_item__get_id.  Once you got the item_id just look at cr_items.live_revision.  This is what I used, so mine is nothing different just a tcl api wrapper.

Hope this helps and gives some ideas.