cr_write_content (public)

 cr_write_content [ -string ] [ -item_id item_id ] \
    [ -revision_id revision_id ]

Defined in packages/acs-content-repository/tcl/revision-procs.tcl

Write out the specified content to the current HTTP connection or return it to the caller by using the -string flag. Only one of item_id and revision_id should be passed to this procedure. If item_id is provided the item's live revision will be written, otherwise the specified revision. This routine was written to centralize the downloading of data from the content repository. Previously, similar code was scattered among various packages, not all of which were written to handle both in-database and in-filesystem storage of content items. Though this routine is written to be fully general in terms of a content item's storage type, typically those stored as text aren't simply dumped to the user in raw form, but rather ran through the templating system in order to surround the content with decorative HTML.

Switches:
-string (optional, boolean)
specifies whether the content should be returned as a string or (the default) be written to the HTML connection (ola@polyxena.net)
-item_id (optional)
the item to write
-revision_id (optional)
revision to write
Author:
Don Baccus <dhogaza@pacifier.com>

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_revision content_revision (test acs-content-repository) cr_write_content cr_write_content test_content_revision->cr_write_content db_0or1row db_0or1row (public) cr_write_content->db_0or1row download_file_downloader download_file_downloader (public) download_file_downloader->cr_write_content oacs_dav::impl::content_revision::get oacs_dav::impl::content_revision::get (private) oacs_dav::impl::content_revision::get->cr_write_content oacs_dav::impl::content_revision::head oacs_dav::impl::content_revision::head (private) oacs_dav::impl::content_revision::head->cr_write_content packages/acs-subsite/www/shared/email-image-bits.tcl packages/acs-subsite/ www/shared/email-image-bits.tcl packages/acs-subsite/www/shared/email-image-bits.tcl->cr_write_content packages/acs-subsite/www/shared/portrait-bits.tcl packages/acs-subsite/ www/shared/portrait-bits.tcl packages/acs-subsite/www/shared/portrait-bits.tcl->cr_write_content

Testcases:
content_revision
[ show source ]
Show another procedure: