content::item::new (public)
content::item::new -name name [ -parent_id parent_id ] \ [ -item_id item_id ] [ -locale locale ] \ [ -creation_date creation_date ] [ -creation_user creation_user ] \ [ -context_id context_id ] [ -package_id package_id ] \ [ -creation_ip creation_ip ] [ -item_subtype item_subtype ] \ [ -content_type content_type ] [ -title title ] \ [ -description description ] [ -mime_type mime_type ] \ [ -nls_language nls_language ] [ -text text ] [ -data data ] \ [ -relation_tag relation_tag ] [ -is_live is_live ] \ [ -storage_type storage_type ] [ -attributes attributes ] \ [ -tmp_filename tmp_filename ]
Defined in packages/acs-content-repository/tcl/content-item-procs.tcl
Create a new content item This proc creates versioned content items where content_type iscontent_revision or subtypes of content revision. There are procedures for each other base content item. This procedure uses package_instantiate object. Under PostgreSQL the object_type new function must be registered with define_function_args.
- Switches:
- -name (required)
- name of the item, must be unique for the folder
- -parent_id (optional)
- parent object of this content_item
- -item_id (optional)
- item_id of this content_item. If this is not specified an item_id will be generated automatically
- -locale (optional)
- -
- -creation_date (optional)
- defaults to current date and time
- -creation_user (optional)
- -
- -context_id (optional)
- Context of the item. usually used in conjunction with permissions.
- -package_id (optional)
- Package ID of the object
- -creation_ip (optional)
- -
- -item_subtype (optional, defaults to
"content_item"
)- -content_type (optional, defaults to
"content_revision"
)- content_revision or subtype of content_revision
- -title (optional)
- - title of content_revision to be created
- -description (optional)
- of content_revision to be created
- -mime_type (optional)
- -nls_language (optional)
- - ???
- -text (optional)
- - text of content revision to be created
- -data (optional)
- - ???
- -relation_tag (optional)
- -is_live (optional, defaults to
"f"
)- -storage_type (optional, defaults to
"file"
)- file, lob, or text (postgresql only)
- -attributes (optional)
- A list of lists of pairs of additional attributes and their values to pass to the constructor. Each pair is a list of two elements: key => value such as [list [list attribute value] [list attribute value]]
- -tmp_filename (optional)
- file containing content to be added to new revision. Caller is responsible to handle cleaning up the temporary file
- Returns:
- item_id of the new content item
- Author:
- Dave Bauer <dave@thedesignexperience.org>
- Created:
- 2004-05-28
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- content_image, content_item, content_item_nested_structure, content_revision, cr_item_search_triggers, data_links_update_links, data_links_update_links_with_tag, data_links_with_tag