Index: openacs.org-dev/packages/edit-this-page/www/doc/applications.html =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/edit-this-page/www/doc/applications.html,v diff -u -N -r1.1 -r1.2 --- openacs.org-dev/packages/edit-this-page/www/doc/applications.html 9 Jan 2003 20:24:15 -0000 1.1 +++ openacs.org-dev/packages/edit-this-page/www/doc/applications.html 9 Jan 2003 21:11:25 -0000 1.2 @@ -1,45 +1,21 @@ ETP applications -
-
This is G o o g l e's cache of http://etp.museatech.net/etpdoc/applications.
-G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
-The page may have changed since that time. Click here for the current page without highlighting.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:pwZIPa5DPGUC:etp.museatech.net/etpdoc/applications+etp+documentation+site:etp.museatech.net&hl=en&ie=UTF-8


Google is not affiliated with the authors of this page nor responsible for its content.
-
These search terms have been highlighted:�etp�documentation�
-
-
- +

ETP Applications

- - - - - - -A Musea Technologies Project - - -

ETP applications

- - -Edit This Page Demonstration : ETP Documentation : ETP applications - -
+ETP Documentation:ETP Applications
- +

What is an ETP Application?

- -

What is an ETP Application?

- -After you've created a package instance of ETP, +After you've created a package instance of ETP, you've got a virtual directory on your website where you can create and edit pages, links, or subdirectories. The pages you create have a very plain appearance and behavior: the index page displays a list of the other pages, and the other pages simply display whatever content you enter for them. This behavior is governed by what's known as the "default application".

-The default application is defined by the ETP package at server startup time as follows: -

etp::define_application default {
+The default application is defined by the ETP package at server startup time as follows:
+

etp::define_application default {
     index_template               packages/editthispage/templates/article-index
     index_content_type           content_revision
     index_object_name           "subtopic"
@@ -64,29 +40,29 @@
 applications based on it, thereby changing the appearance and content of
 your web pages.

Modifying the default application

-It's a good bet that you'll want to alter the appearance of the pages generated by ETP. +It's a good bet that you'll want to alter the appearance of the pages generated by ETP. I highly recommend designing a master template for your site, and ensuring that all packages you've installed are using it. (If you don't know what -a master template is, the ACS Templating Reference will tell you). First, make a copy of the templates you want from ETP: +a master template is, the ACS Templating Reference will tell you). First, make a copy of the templates you want from ETP:
cd /web/MYSERVER/www
 mkdir templates
 cp ../packages/editthispage/www/templates/* templates
 
Now you can change the tag at the top of article-index.adp and article-content.adp to refer to your master template. Next, create a file in the MYSERVER/tcl directory, and add the following code: -
etp::modify_application default {
+
etp::modify_application default {
     index_template        www/templates/article-index
     content_template      www/templates/article-content
 }    
 
-After restarting your server, every instance of ETP that's using the "default" application will be rendered using your master template. +After restarting your server, every instance of ETP that's using the "default" application will be rendered using your master template.

Creating new applications

-When you edit a content section in ETP, you'll see a link that says "Choose ETP +When you edit a content section in ETP, you'll see a link that says "Choose ETP Application". At first this list contains just a few entries: default, faq, -news, and whatever other example applications were included with the ETP package. You can add your own entries to the list by calling the etp_define_application +news, and whatever other example applications were included with the ETP package. You can add your own entries to the list by calling the etp_define_application procedure. The real power of defining new applications is that you can create templates that reference structured data that is stored for each page in -the content repository, and ETP gives you the means to edit and organize the structured data. To learn about how that works, please go on to read about Content Types. +the content repository, and ETP gives you the means to edit and organize the structured data. To learn about how that works, please go on to read about Content Types. Index: openacs.org-dev/packages/edit-this-page/www/doc/contenttypes.html =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/edit-this-page/www/doc/contenttypes.html,v diff -u -N -r1.1 -r1.2 --- openacs.org-dev/packages/edit-this-page/www/doc/contenttypes.html 9 Jan 2003 20:24:15 -0000 1.1 +++ openacs.org-dev/packages/edit-this-page/www/doc/contenttypes.html 9 Jan 2003 21:11:25 -0000 1.2 @@ -1,39 +1,17 @@ Content Types -
-
This is G o o g l e's cache of http://etp.museatech.net/etpdoc/contenttypes.
-G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
-The page may have changed since that time. Click here for the current page without highlighting.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:k8Vr8F1LNI4C:etp.museatech.net/etpdoc/contenttypes+etp+documentation+site:etp.museatech.net&hl=en&ie=UTF-8


Google is not affiliated with the authors of this page nor responsible for its content.
-
These search terms have been highlighted:�etp�documentation�
-
-
- + +

ETP Content Types

- - - - - -A Musea Technologies Project - - -

Content Types

- - -Edit This Page Demonstration : ETP Documentation : Content Types - -
+ETP Documentation:ETP Content Types
- - -

Standard page attributes

-The content repository data model (a standard part of OpenACS 4) primarily keeps track of content items, each of which may have multiple content revisions. The content_revision object type refers to a row in the cr_revisions table. Each revision contains the standard attributes of the pages you create with ETP, such as Title, Description, and Content. Additionally, the standard acs_object attributes are stored for each revision, such as the creation date and creating user. +The content repository data model (a standard part of OpenACS 4) primarily keeps track of content items, each of which may have multiple content revisions. The content_revision object type refers to a row in the cr_revisions table. Each revision contains the standard attributes of the pages you create with ETP, such as Title, Description, and Content. Additionally, the standard acs_object attributes are stored for each revision, such as the creation date and creating user.

-Referring back to the definition of the default ETP application, you'll notice that it specifies that the content_revision +Referring back to the definition of the default ETP application, you'll notice that it specifies that the content_revision content type is to be used for the index page and for all content pages. This means that the page templates used by the default application may refer to only the standard page attributes stored in the cr_revisions table. @@ -54,11 +32,11 @@ and journal articles need to have a section and an abstract.

Defining a new content type

Creating a new content type is done by calling the etp::define_content_type procedure from one of your tcl library files. Here's how you would accomplish the journal example discussed above: -
etp::define_content_type journal_issue "Journal Issue" "Journal Issues" {
+
etp::define_content_type journal_issue "Journal Issue" "Journal Issues" {
     { publication_date "Publication Date" "Publication Dates" string "size=60" "" }
 }
 
-etp::define_content_type journal_article "Journal Article" "Journal Articles" {
+etp::define_content_type journal_article "Journal Article" "Journal Articles" {
     { section Section Sections string "" "" }
     { abstract Abstract Abstracts string "rows=24 cols=80" "" }
 }
@@ -82,13 +60,13 @@
                     rows or cols.)
           
  • default_value (can either be a string denoting a single default value, or the name of a callback function you've - defined in the etp namespace which is used to + defined in the etp namespace which is used to provide values for select lists).
  • -Once you've defined a content type, you may refer to it when calling the etp::define_application procedure to set up a new application. To continue with our journal example, you'd want to do this as follows: +Once you've defined a content type, you may refer to it when calling the etp::define_application procedure to set up a new application. To continue with our journal example, you'd want to do this as follows: -
    etp::define_application journal {
    +
    etp::define_application journal {
         index_template                www/templates/journal-issue
         index_object_name             "Journal Issue"
         index_content_type            journal_issue
    @@ -99,9 +77,9 @@
     }
     
    -Creating the templates that make use of your custom content types is the subject of the next page. +Creating the templates that make use of your custom content types is the subject of the next page. After that's been done, the authors of the journal will be able to create -a new issue of the journal simply by creating a new instance of the ETP package (a process that's automated within the ETP +a new issue of the journal simply by creating a new instance of the ETP package (a process that's automated within the ETP interface by the "create subtopic" command) and ensuring that the new content section is using the journal application. This setup can be automated, since it's possible to specify the application to use for any subtopic created Index: openacs.org-dev/packages/edit-this-page/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/edit-this-page/www/doc/index.html,v diff -u -N -r1.1 -r1.2 --- openacs.org-dev/packages/edit-this-page/www/doc/index.html 9 Jan 2003 20:24:15 -0000 1.1 +++ openacs.org-dev/packages/edit-this-page/www/doc/index.html 9 Jan 2003 21:11:25 -0000 1.2 @@ -1,61 +1,38 @@ ETP Documentation -
    -
    This is G o o g l e's cache of http://etp.museatech.net/etpdoc/.
    -G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
    -The page may have changed since that time. Click here for the current page without highlighting.
    To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:mbY4OODrFn0C:etp.museatech.net/etpdoc/+documentation+site:etp.museatech.net&hl=en&ie=UTF-8


    Google is not affiliated with the authors of this page nor responsible for its content.
    -
    These search terms have been highlighted:�documentation�
    -
    -
    - + +

    ETP Documentation

    - - - - - -A Musea Technologies Project - - -

    ETP Documentation

    - - -Edit This Page Demonstration : ETP Documentation - -

    - -
    -Installation instructions +Installation instructions
    -ETP applications +ETP applications - Describes the default behavior of the ETP package, and how it can be extended and customized.
    -Content Types +Content Types - How to specialize the pages you create with additional structured data fields
    -Templates +Templates - Customizing the appearance of pages managed by ETP
    -

    Index: openacs.org-dev/packages/edit-this-page/www/doc/install.html =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/edit-this-page/www/doc/install.html,v diff -u -N -r1.1 -r1.2 --- openacs.org-dev/packages/edit-this-page/www/doc/install.html 9 Jan 2003 20:24:15 -0000 1.1 +++ openacs.org-dev/packages/edit-this-page/www/doc/install.html 9 Jan 2003 21:11:25 -0000 1.2 @@ -1,34 +1,14 @@ Installation instructions -
    -
    This is G o o g l e's cache of http://etp.museatech.net/etpdoc/install.
    -G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
    -The page may have changed since that time. Click here for the current page without highlighting.
    To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:ReiRsgzboSsC:etp.museatech.net/etpdoc/install+etp+documentation+site:etp.museatech.net&hl=en&ie=UTF-8


    Google is not affiliated with the authors of this page nor responsible for its content.
    -
    These search terms have been highlighted:�etp�documentation�
    -
    -
    - - - - - - - - -A Musea Technologies Project - - +

    Installation instructions

    - -Edit This Page Demonstration : ETP Documentation : Installation instructions - -
    +ETP Documentation:Install
    -I'm assuming you've already installed OpenACS 4, loaded +I'm assuming you've already installed OpenACS 4, loaded the data model, and you can see the "Congratulations!" page in your web browser. - First, install the ETP package by navigating to the package manager (found at acs-admin/apm), and selecting "Load a new package from a URL or local directory". You may install the latest ETP distribution by entering http://etp.museatech.net/download/editthispage-1.0.apm. + First, install the ETP package by navigating to the package manager (found at acs-admin/apm), and selecting "Load a new package from a URL or local directory".

    The Package Manager will retrieve the package code, place it in your server's packages/editthispage directory, and perform the necessary database @@ -37,7 +17,7 @@ Now you may test the package by visiting the Site Map (found at admin/site-map), creating a new directory, selecting "new application", and choosing Edit This Page. Within that directory, anyone who has "write" permission will -see a link that takes them to the ETP interface from which they may edit the content of the page. +see a link that takes them to the ETP interface from which they may edit the content of the page.

    However, you're not really having fun until you can modify your home page through your web browser. By entering the following commands, you'll set up your site so that Edit This Page can also serve pages at the top level Index: openacs.org-dev/packages/edit-this-page/www/doc/templates.html =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/edit-this-page/www/doc/templates.html,v diff -u -N -r1.1 -r1.2 --- openacs.org-dev/packages/edit-this-page/www/doc/templates.html 9 Jan 2003 20:24:15 -0000 1.1 +++ openacs.org-dev/packages/edit-this-page/www/doc/templates.html 9 Jan 2003 21:11:25 -0000 1.2 @@ -1,52 +1,31 @@ Templates -
    -
    This is G o o g l e's cache of http://etp.museatech.net/etpdoc/templates.
    -G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
    -The page may have changed since that time. Click here for the current page without highlighting.
    To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:kaDJjn1RdBYC:etp.museatech.net/etpdoc/templates+etp+documentation+site:etp.museatech.net&hl=en&ie=UTF-8


    Google is not affiliated with the authors of this page nor responsible for its content.
    -
    These search terms have been highlighted:�etp�documentation�
    -
    -


    - + +

    ETP Templates

    - - - - - -A Musea Technologies Project - - -

    Templates

    - - -Edit This Page Demonstration : ETP Documentation : Templates - -
    +ETP Documentation:ETP Templates
    - - -To use ETP, or in fact to effectively use OpenACS 4, it's essential that you become familiar with the ArsDigita Templating System. ETP's +To use ETP, or in fact to effectively use OpenACS 4, it's essential that you become familiar with the OpenACS Templating System. ETP's support for rapid application development includes procedures for creating the data sources that will be used by your page templates. You can copy code from the examples in the packages/editthispage/templates directory to get started, but here's an overview of what you need to know.

    Providing the "Edit this page" link

    -As demonstrated in packages/editthispage/www/master.tcl, you should call the procedure etp::get_etp_link +As demonstrated in packages/editthispage/www/master.tcl, you should call the procedure etp::get_etp_link from your own master template, in order to determine whether or not to present the user with the "Edit this page" option. The procedure returns the html -link only within an instance of the ETP package, and then only if the user has write access. Otherwise an empty string is returned. +link only within an instance of the ETP package, and then only if the user has write access. Otherwise an empty string is returned.

    Retrieving page attributes for the template to display

    -Every ETP template will make use of the etp::get_page_attributes procedure. It creates an array variable called pa in the caller's stack frame, +Every ETP template will make use of the etp::get_page_attributes procedure. It creates an array variable called pa in the caller's stack frame, containing all the attributes necessary to render the current page. These attributes include the standard elements from the cr_revisions table such as title, description, and content. If the page is using -a custom content type, any extended page +a custom content type, any extended page attributes that correspond to it will be included.

    The complete list of standard attributes in the pa array is as follows: @@ -59,7 +38,7 @@

  • description
  • publish_date
  • content -
  • extended attributes, if any, defined by etp::make_content_type +
  • extended attributes, if any, defined by etp::make_content_type
  • The procedure is designed to be efficient under heavy load. The database is accessed once to retrieve the attributes, and a second time to generate @@ -70,7 +49,7 @@ the standard syntax for "onerow" data sources; for example, @pa.content@.

    Retrieving the list of pages in a content section

    -ETP templates used for the index page will almost always make use of the etp::get_content_items procedure. It creates a variable called content_items +ETP templates used for the index page will almost always make use of the etp::get_content_items procedure. It creates a variable called content_items in the caller's stack frame. This is a multirow result set suitable for passing to an index template, containing all the structured data necessary to present a list of links to content pages, folders, extlinks, or symlinks. @@ -96,7 +75,7 @@ Additionally, you may name additional attributes that will be returned, either from the standard page attributes stored in cr_revisions, or extended page attributes defined with - etp::make_content_type. + etp::make_content_type.

    The content_items variable is created with a single db query, and currently is never cached.