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 -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 @@
|
-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:Now you can change thecd /web/MYSERVER/www mkdir templates cp ../packages/editthispage/www/templates/* templatestag at the top of
article-index.adp
andarticle-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 { +-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.etp::modify_application default { index_template www/templates/article-index content_template www/templates/article-content }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 theetp_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 theetp_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.