Index: openacs-4/contrib/packages/simulation/lib/object-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/object-display.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/simulation/lib/object-display.adp 17 Oct 2003 09:22:55 -0000 1.2 +++ openacs-4/contrib/packages/simulation/lib/object-display.adp 24 Oct 2003 12:27:01 -0000 1.3 @@ -1,6 +1,11 @@ @page_title;noquote@ @context;noquote@ + + + + + @content_html;noquote@ Index: openacs-4/contrib/packages/simulation/lib/object-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/object-display.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/simulation/lib/object-display.tcl 17 Oct 2003 09:55:53 -0000 1.4 +++ openacs-4/contrib/packages/simulation/lib/object-display.tcl 24 Oct 2003 12:27:01 -0000 1.5 @@ -65,29 +65,17 @@ set delete_url [export_vars -base [ad_conn package_url]object-delete { { item_id $item(item_id) } }] } - ##### # -# Render using template +# Serve stylesheet # ##### -# Dropped -return - -item::get_content \ - -revision_id [item::get_live_revision [item::get_template_id $item(item_id)]] \ - -array template - -# Make content available to rendered page -foreach __elm [array names content] { - set $__elm $content($__elm) +if { [info exists content(stylesheet)] } { + array set item [bcms::item::get_item -item_id $content(stylesheet)] + + set stylesheet_url [file join [ad_conn package_url] object-content $item(name)] +} else { + set stylesheet_url {} } - -publish::push_id $item_id $revision_id -set code [template::adp_compile -string $template(text)] -set rendered_page [template::adp_eval code] -publish::pop_id - - Index: openacs-4/contrib/packages/simulation/www/object-content/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/object-content/Attic/index.vuh,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/simulation/www/object-content/index.vuh 24 Oct 2003 12:27:01 -0000 1.1 @@ -0,0 +1,26 @@ +ad_page_contract { + Returns the contents of an object + + @author Lars Pind (lars@collaboraid.biz) + @creation-date 2003-10-14 + @cvs-id $Id: index.vuh,v 1.1 2003/10/24 12:27:01 lars Exp $ +} { + revision_id:optional,naturalnum +} + +set root_id [bcms::folder::get_id_by_package_id -parent_id 0] + +set extra_url [eval file join [lrange [file split [ad_conn extra_url]] 1 end]] + +if { [empty_string_p $extra_url] } { + set extra_url "index" +} + +# get the item by url if now revision id is given +if { ![info exists revision_id] } { + array set item [bcms::item::get_item_by_url -root_id $root_id -url $extra_url -revision live] +} else { + array set item [bcms::revision::get_revision -revision_id $revision_id] +} + +cr_write_content -item_id $item(item_id) Index: openacs-4/packages/simulation/lib/object-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/object-display.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/simulation/lib/object-display.adp 17 Oct 2003 09:22:55 -0000 1.2 +++ openacs-4/packages/simulation/lib/object-display.adp 24 Oct 2003 12:27:01 -0000 1.3 @@ -1,6 +1,11 @@ @page_title;noquote@ @context;noquote@ + + + + + @content_html;noquote@ Index: openacs-4/packages/simulation/lib/object-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/object-display.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/simulation/lib/object-display.tcl 17 Oct 2003 09:55:53 -0000 1.4 +++ openacs-4/packages/simulation/lib/object-display.tcl 24 Oct 2003 12:27:01 -0000 1.5 @@ -65,29 +65,17 @@ set delete_url [export_vars -base [ad_conn package_url]object-delete { { item_id $item(item_id) } }] } - ##### # -# Render using template +# Serve stylesheet # ##### -# Dropped -return - -item::get_content \ - -revision_id [item::get_live_revision [item::get_template_id $item(item_id)]] \ - -array template - -# Make content available to rendered page -foreach __elm [array names content] { - set $__elm $content($__elm) +if { [info exists content(stylesheet)] } { + array set item [bcms::item::get_item -item_id $content(stylesheet)] + + set stylesheet_url [file join [ad_conn package_url] object-content $item(name)] +} else { + set stylesheet_url {} } - -publish::push_id $item_id $revision_id -set code [template::adp_compile -string $template(text)] -set rendered_page [template::adp_eval code] -publish::pop_id - - Index: openacs-4/packages/simulation/www/object-content/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/object-content/index.vuh,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/simulation/www/object-content/index.vuh 24 Oct 2003 12:27:01 -0000 1.1 @@ -0,0 +1,26 @@ +ad_page_contract { + Returns the contents of an object + + @author Lars Pind (lars@collaboraid.biz) + @creation-date 2003-10-14 + @cvs-id $Id: index.vuh,v 1.1 2003/10/24 12:27:01 lars Exp $ +} { + revision_id:optional,naturalnum +} + +set root_id [bcms::folder::get_id_by_package_id -parent_id 0] + +set extra_url [eval file join [lrange [file split [ad_conn extra_url]] 1 end]] + +if { [empty_string_p $extra_url] } { + set extra_url "index" +} + +# get the item by url if now revision id is given +if { ![info exists revision_id] } { + array set item [bcms::item::get_item_by_url -root_id $root_id -url $extra_url -revision live] +} else { + array set item [bcms::revision::get_revision -revision_id $revision_id] +} + +cr_write_content -item_id $item(item_id)