etp::make_page (public)
etp::make_page name [ title ] [ item_id ]
Defined in packages/edit-this-page/tcl/etp-procs.tcl
- Parameters:
- name (required)
- the name of the page you wish to create in the current package Creates a new page (content item) with the given name by inserting a row into the cr_items table, and creates an initial revision by inserting a row into the cr_revisions table.
- title (optional, defaults to
"Untitled"
)- item_id (optional)
- Author:
- Luke Pond
- Created:
- 2001-05-31
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set package_id [ad_conn package_id] set content_type [etp::get_content_type $name] # ensure an entry in cr_items for this (package_id, name) combination if { ![db_0or1row page_exists ""] } { db_exec_plsql page_create "" }Generic XQL file: packages/edit-this-page/tcl/etp-procs.xql
PostgreSQL XQL file: <fullquery name="etp::make_page.page_create"> <querytext> select etp__create_page( :item_id, :package_id, :name, :title, :content_type ) </querytext> </fullquery> <fullquery name="etp::make_page.page_exists"> <querytext> select 1 from cr_items where parent_id = etp__get_folder_id(:package_id) and name = :name </querytext> </fullquery>packages/edit-this-page/tcl/etp-procs-postgresql.xql
Oracle XQL file: <fullquery name="etp::make_page.page_create"> <querytext> begin :1 := etp.create_page( package_id => :package_id, name => :name, title => :title, content_type => :content_type ); end; </querytext> </fullquery> <fullquery name="etp::make_page.page_exists"> <querytext> select 1 from cr_items where parent_id = etp.get_folder_id(:package_id) and name = :name </querytext> </fullquery>packages/edit-this-page/tcl/etp-procs-oracle.xql