Index: openacs-4/packages/edit-this-page/www/doc/applications.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/edit-this-page/www/doc/applications.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/edit-this-page/www/doc/applications.adp 20 Aug 2015 18:49:01 -0000 1.1 +++ openacs-4/packages/edit-this-page/www/doc/applications.adp 26 Aug 2015 18:03:34 -0000 1.2 @@ -2,10 +2,12 @@ {/doc/edit-this-page {Edit This Page}} {ETP applications} ETP applications - - -

ETP Applications


ETP Documentation:ETP Applications +

ETP Applications

+
+ETP Documentation +:ETP Applications

What is an ETP Application?

+ 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 @@ -14,7 +16,8 @@ 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:

+startup time as follows:

+
 etp::define_application default {
     index_template               packages/editthispage/templates/article-index
     index_content_type           etp_page_revision
@@ -37,24 +40,30 @@
     auto_page_name        ""
 }
 
+ You may customize the default application, or create new 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. 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 +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 +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:
@@ -63,20 +72,24 @@
     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.

Creating new applications

+ 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 procedure. The real power of +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. -
luke\@museatech.net
- +go on to read about Content Types +. +
+
luke\@museatech.net