Index: openacs-4/packages/acs-core-docs/www/tutorial-pages.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-pages.adp,v diff -u -r1.1.2.12 -r1.1.2.13 --- openacs-4/packages/acs-core-docs/www/tutorial-pages.adp 21 Jun 2016 07:44:36 -0000 1.1.2.12 +++ openacs-4/packages/acs-core-docs/www/tutorial-pages.adp 23 Jun 2016 08:32:46 -0000 1.1.2.13 @@ -16,15 +16,16 @@ OpenACS documentation staff.
As a workaround for missing content-repository functionality, -copy a provided file into the directory for tcl files:
cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/tutorial/note-procs.tcl /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/tcl/
To make this file take effect, go to the APM and choose "Reload changed" -for "MyFirstPackage".
+copy a provided file into the directory for tcl files:cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/tutorial/note-procs.tcl /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/tcl/
To make this file take effect, go to the APM and choose "Reload +changed" for "MyFirstPackage".
Our package will have two visible pages. The first shows a list of all objects; the second shows a single object in view or edit mode, and can also be used to add an object. The index page will -display the list, but since we might reuse the list later, we'll -put it in a seperate file and include it on the index page.
adp
page holds html. The
-postgres.xql
and -oracle.xql
files contains
database-specific SQL. The default page in any directory is
-index
, so we'll build that
+index
, so we'll build that
first, starting with the tcl file:[$OPENACS_SERVICE_NAME postgresql]$cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackages/www
[$OPENACS_SERVICE_NAME www]$emacs index.tcl
@@ -47,7 +48,7 @@ This is the main page for the package. It displays all of the Notes and provides links to edit them and to create new Notes. \@author Your Name (you\@example.com) - \@cvs-id $Id: index.tcl,v 1.2.22.1 2015/09/10 08:21:20 gustafn Exp $ + \@cvs-id $Id: tutorial-pages.html,v 1.44.2.10 2016/06/21 07:44:36 gustafn Exp $ } set page_title [ad_conn instance_name] @@ -63,8 +64,8 @@ <property name="context">\@context;literal\@</property> <include src="/packages/myfirstpackage/lib/note-list">
The index page includes the list page, which we put in /lib -instead of /www to designate that it's available for reuse by other -packages.
+instead of /www to designate that it's available for reuse by +other packages.[$OPENACS_SERVICE_NAME www]$mkdir /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/lib
[$OPENACS_SERVICE_NAME www]$cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/lib
[$OPENACS_SERVICE_NAME lib]$emacs note-list.tcl
@@ -126,7 +127,7 @@ This is the view-edit page for notes. \@author Your Name (you\@example.com) - \@cvs-id $Id: note-edit.tcl,v 1.3.2.1 2015/09/10 08:21:20 gustafn Exp $ + \@cvs-id $Id: tutorial-pages.html,v 1.44.2.10 2016/06/21 07:44:36 gustafn Exp $ \@param item_id If present, assume we are editing that note. Otherwise, we are creating a new note. } { @@ -185,7 +186,7 @@ This deletes a note \@author Your Name (you\@example.com) - \@cvs-id $Id: note-delete.tcl,v 1.3.2.1 2015/09/10 08:21:20 gustafn Exp $ + \@cvs-id $Id: tutorial-pages.html,v 1.44.2.10 2016/06/21 07:44:36 gustafn Exp $ \@param item_id The item_id of the note to delete } { @@ -197,7 +198,7 @@ mfp::note::delete -item_id $item_id ad_returnredirect "." -# stop running this code, since we're redirecting +# stop running this code, since we're redirecting abort # Local variables: