Index: openacs-4/packages/acs-content-repository/www/doc/guide/items.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/guide/items.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-content-repository/www/doc/guide/items.adp 7 Aug 2017 23:47:47 -0000 1.3 +++ openacs-4/packages/acs-content-repository/www/doc/guide/items.adp 30 Apr 2018 08:15:07 -0000 1.4 @@ -13,34 +13,29 @@ content_item.new function. A name is the only parameter required to create an item:
-item_id := content_item.new( name => 'my_item' ); -+item_id := content_item.new( name => 'my_item' );
The name represents the tail of the URL for that content item. In most cases you will want to create items in a particular context with the repository hierarchy:
--item_id := content_item.new( +item_id := content_item.new( name => 'my_item', parent_id => :parent_id -); -+);
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 for auditing purposes. You can also create the initial revision and publish text items in a single step:
--item_id := content_item.new( +item_id := content_item.new( name => 'my_item', parent_id => :parent_id, title => 'My Item', text => 'Once upon a time Goldilocks crossed the street. Here comes a car...uh oh! The End', is_live => 't' -); -+);
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 @@ -51,9 +46,8 @@ published by calling the content_item.set_live_revision procedure, which takes as input a revision_id:
-content_item.set_live_revision( revision_id => :revision_id ); -+content_item.set_live_revision( revision_id => :revision_id );
Last Modified: $Id: items.html,v 1.1.1.1.30.1 2016/06/22 -07:40:41 gustafn Exp $
+Last Modified: $Id: items.html,v 1.2 2017/08/07 23:47:47 gustafn +Exp $