Index: openacs-4/packages/acs-templating/www/doc/tagref/include.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/include.html,v diff -u -r1.1.1.1.4.1 -r1.1.1.1.4.2 --- openacs-4/packages/acs-templating/www/doc/tagref/include.html 19 Nov 2002 13:23:16 -0000 1.1.1.1.4.1 +++ openacs-4/packages/acs-templating/www/doc/tagref/include.html 20 Nov 2002 00:35:51 -0000 1.1.1.1.4.2 @@ -17,9 +17,10 @@ as any other dynamic template; the developer may associate data sources and other properties to them.
+<include src="subtemplate" attribute=value ...>+
<include src="subtemplate.adp" attribute=value ...>
<include src="subtemplate" source_id="@source_id@" ...>+
<include src="subtemplate.adp" source_id="@source_id@" ...>To pass a datasource, e.g.
users
, by reference, use
this notation:
- <include src="subtemplate" &persons="users" ...>+
<include src="subtemplate.adp" &persons="users" ...>This is particularly useful for passing onerow and multirow data sourced. Note that in this case, if the subtemplate modifies the value this will affect the includer. When the datasource in the included page has the same name (
&users="users"
), you
can use the shorthand &="users"
.
+
+ + So if you'd like to have a template that will return a fragment of a + page that you'd like to include in other pages, make sure its .tcl + component does not call ad_page_contract. +
+ ++ If you'd like to include a full page (that is, one which calls + ad_page_contract) then instead of passing a parameter through + <include>, you could use + rp_form_put + to add the variable to that page's form. For additional + references, see how message-chunk is used throughout the forums package. +
+