ad_page_contract { gets a related image, we are using this since we are not yet utilizing versioning on images. We only use the latest revision to make things simple } { image_revision_id:optional,naturalnum } if ![info exists image_revision_id] { set extra_url [ad_conn extra_url] set bcms_root_folder_id [parameter::get -parameter bcms_root_folder_id] array set current_item [bcms::item::get_item_by_url -root_id $bcms_root_folder_id -url $extra_url -revision latest] if {[array size current_item] > 1} { set image_revision_id $current_item(latest_revision) } else { ns_returnnotfound ad_script_abort } } cr_write_content -revision_id $image_revision_id