Index: openacs-4/packages/new-portal/www/element-layout.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/Attic/element-layout.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/www/element-layout.tcl 28 Sep 2001 21:42:30 -0000 1.1 @@ -0,0 +1,36 @@ +# www/element-layout.tcl + +ad_page_contract { + Generate a page with the same layout as the portal, for editing. + + @author Ian Baker (ibaker@arsdigita.com) + @creation-date 12/6/2000 + @cvs-id $Id: element-layout.tcl,v 1.1 2001/09/28 21:42:30 oracle Exp $ +} { + portal_id:naturalnum,notnull,object_write +} + +set user_id [ad_conn user_id] +set master_template [ad_parameter master_template] + +# get the portal. +db_1row select_portal { + select + p.portal_id, + p.name, + t.filename as template, + t.layout_id + from portals p, portal_layouts t + where p.layout_id = t.layout_id and p.portal_id = :portal_id +} -column_array portal + +# fake some elements so that the in the template has something to do. +foreach region [ portal_get_regions $portal(layout_id) ] { + # pass the portal_id along here instead of the element_id. + lappend fake_element_ids($region) $portal_id +} + +set element_list [array get fake_element_ids] +set element_src "[portal_path]/www/place-element" + +ad_return_template