Index: openacs-4/packages/acs-core-docs/www/tutorial-categories.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-categories.html,v diff -u -N -r1.2 -r1.2.2.1 --- openacs-4/packages/acs-core-docs/www/tutorial-categories.html 18 Feb 2004 14:43:03 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/tutorial-categories.html 5 Jul 2004 19:47:33 -0000 1.2.2.1 @@ -1,4 +1,4 @@ -Categories

Categories

You can associate any ACS Object with one or more categories. +Categories

Categories

You can associate any ACS Object with one or more categories. In this tutorial we'll show how to equip your application with user interface to take advantage of the Categories service.

@@ -25,15 +25,15 @@

The way to achieve this is is to provide a link to the Category Management pages. Add the following snippet to your - /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.tcl + /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/admin/index.tcl file:

 set category_map_url [export_vars -base \
     "[site_node::get_package_url -package_key categories]cadmin/one-object" \
         { { object_id $package_id } }]
           

and the following snippet to your - /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.adp + /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/admin/index.adp file:

 <li><a href="@category_map_url@"
@@ -114,7 +114,7 @@
 note_id and
 confirm_p.  If confirm_p is present,
 we delete the record, set redirection back to the index, and abort
-script execution.

The database commands:

[service0@yourserver www]$ emacs note-delete.xql
<?xml version="1.0"?>
+script execution.

The database commands:

[$OPENACS_SERVICE_NAME@yourserver www]$ emacs note-delete.xql
<?xml version="1.0"?>
 <queryset>
   <fullquery name="do_delete">
     <querytext>
@@ -126,7 +126,7 @@
       select samplenote__name(:note_id)
     </querytext>
   </fullquery>
-</queryset>

And the adp page:

[service0@yourserver www]$ emacs note-delete.adp
<master>
+</queryset>

And the adp page:

[$OPENACS_SERVICE_NAME@yourserver www]$ emacs note-delete.adp
<master>
 <property name="title">@title@</property>
 <property name="context">{@title@}</property>
 <h2>@title@</h2>
@@ -135,4 +135,4 @@
 formtemplate tag outputs the HTML
 form generated by the ad_form command with the matching name.  Test it
       by adding the new files in the APM and then deleting a few
-      samplenotes.

View comments on this page at openacs.org
+ samplenotes.

View comments on this page at openacs.org