Index: openacs-4/packages/edit-this-page/www/doc/contenttypes.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/edit-this-page/www/doc/contenttypes.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/edit-this-page/www/doc/contenttypes.adp 20 Aug 2015 18:49:01 -0000 1.1
+++ openacs-4/packages/edit-this-page/www/doc/contenttypes.adp 26 Aug 2015 18:03:35 -0000 1.2
@@ -2,18 +2,25 @@
Referring back to the definition of the default ETP application,
you'll notice that it specifies that the
@@ -23,7 +30,9 @@
attributes. It is just for easier integration with the search
package. The page templates used by the default application may
refer to only the standard page attributes stored in the
-ETP Content Types
ETP Documentation:ETP Content Types
+ETP 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
+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,
+acs_object
+ attributes are stored for each revision,
such as the creation date and creating user.
cr_revisions
table.Extended page attributes: why do we need them?
+cr_revisions
table.
All the standard page attributes (Title, Description, Content, +findings which can be skimmed or searched).
+All the standard page attributes (Title, Description, Content, etc.) are still useful, but in order to provide the structured data elements implied by the journal templates, we need to define some extended page attributes. In particular, we know that journal issues need to have a publication date, and journal articles need -to have a section and an abstract.
etp::define_content_type
+
procedure from one of your tcl library files. Here's how you would
accomplish the journal example discussed above:
-The first 3 parameters to@@ -55,7 +68,9 @@ { abstract Abstract Abstracts string "rows=24 cols=80" "" } }
define_content_type
are the
+
+The first 3 parameters to define_content_type
+ are the
internal name of the content type, the name to display, and the
plural form of that name. The fourth parameter is a list of records
describing each extended page attribute. Each record is a list
@@ -70,8 +85,10 @@
value, or the name of a callback function you've 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
+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:
+ Creating the templates that make use of your custom content types -is the subject of the next page. After +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 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 within a particular directory. -@@ -85,14 +102,16 @@ content_content_type journal_article }
luke\@museatech.net |
luke\@museatech.net |