Index: openacs-4/packages/acs-content-repository/www/doc/guide/items.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/guide/items.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-content-repository/www/doc/guide/items.html 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-content-repository/www/doc/guide/items.html 7 Aug 2017 23:47:47 -0000 1.2 @@ -4,13 +4,13 @@

Creating Content Items

- Content Repository : - Developer Guide + Content Repository : + Developer Guide

Use the Content Item API to create the item

-

Content items are initialized using the content_item.new +

Content items are initialized using the content_item.new function. A name is the only parameter required to create an item:

item_id := content_item.new( name => 'my_item' );
@@ -27,9 +27,9 @@

The parent ID must be another content item, or a subclass of content item such as a folder.

-

The content_item.new function accepts a number of other -optional parameters. The standard creation_date, -creation_user and creation_ip should be specified +

The content_item.new function accepts a number of other +optional parameters. The standard creation_date, +creation_user and creation_ip should be specified for auditing purposes. You can also create the initial revision and publish text items in a single step:

@@ -44,15 +44,15 @@

If either the title or text are not null, the function will create the first revision of the item. It will also mark the item as live if -the is_live parameter is true. The alternative to this one +the is_live parameter is true. The alternative to this one step method is to create a content item and then add a revision using the Content Revision API.

Publishing a content item

If a content item has at least one revision, then it can be published by -calling the content_item.set_live_revision procedure, which takes -as input a revision_id:

+calling the content_item.set_live_revision procedure, which takes +as input a revision_id:

content_item.set_live_revision( revision_id => :revision_id );