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 @@
|
packages/editthispage/templates
directory to get started, but here's an overview of what you need to know.
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.
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 @@
@pa.content@
.
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.