Home
The Toolkit for Online Communities
15899 Community Members, 0 members online, 2386 visitors today
Log In Register

content::item::new

OpenACS Home : ACS API Browser : content::item::new

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

Switches:
-name (required)
-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 (defaults to "content_item") (optional)
-content_type (defaults to "content_revision") (optional)
- 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)
-storage_type (defaults to "file") (optional)
- file, lob, or text (postgresql only)
-attributes (optional)
- A list of lists ofpairs 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 tmp file
Returns:
item_id of the new content item
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-05-28 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 procdedure uses package_instantiate object. Under PostgreSQL the object_type new function must be registered with define_function_args.

See Also:
  • content::symlink::new content::extlink::new content::folder::new
[ show source ]
Show another procedure: