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 -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
-
-
-
-
-
-
-
-
-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 -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� |
- |
|
-
-
-
-
-
-
-
-
-
-
-
-
+
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 -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
-
-
-
-
-
-
-
-
-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.