OpenACS Templating

This OpenACS package provides important templating functionality that is used as the base of ]po[ HTML GUI.

This package is of interest to software developers with intentions to understand the details of ]po[ software development. 

  

Requirements What the template system should do for you.

Noquote A revision in 5.0 that escapes all html codes by default.
Design Gets more specific and discusses the way the templating system integrates with ACS. Gory details.
Designer Guide Writing a Template, the ADP part of a page
          Tags Template markup tag reference

Using Noquote Upgrading and writing new pages with noquote.
Developer Guide   API for programming the TCL part of a page

API, TclDoc API Viewer     Object and API Reference
Migration Bringing legacy tcl pages to use the template system.
Demonstration Samples of the various mechanisms, with both TCL and ADP parts.

 

 

 

Package Documentation 

Procedure Files

tcl/0-acs-templating-procs.tcl        
tcl/acs-integration-procs.tcl        
tcl/apm-callback-procs.tcl       APM callback procedures for acs-templating. 
tcl/currency-procs.tcl       APM callback procedures for acs-templating. 
tcl/data-procs.tcl       APM callback procedures for acs-templating. 
tcl/date-procs.tcl       APM callback procedures for acs-templating. 
tcl/debug-procs.tcl       APM callback procedures for acs-templating. 
tcl/dimensional-procs.tcl       Definition of dimensional selection bar widget and helper functions. 
tcl/doc-procs.tcl       Definition of dimensional selection bar widget and helper functions. 
tcl/doc-tcl-procs.tcl       Definition of dimensional selection bar widget and helper functions. 
tcl/element-procs.tcl       Definition of dimensional selection bar widget and helper functions. 
tcl/file-procs.tcl       Definition of dimensional selection bar widget and helper functions. 
tcl/filter-procs.tcl       Definition of dimensional selection bar widget and helper functions. 
tcl/form-procs.tcl       Definition of dimensional selection bar widget and helper functions. 
tcl/head-procs.tcl       The template::head::* api manipulates the head section of the document that will be returned to the users client. 
tcl/list-procs.tcl       Procs for the list builder. 
tcl/mime-procs.tcl       Provides procedures needed to determine mime type required for the client browser, as well as other additional header information. 
tcl/paginator-procs.tcl       Provides procedures needed to determine mime type required for the client browser, as well as other additional header information. 
tcl/parse-procs.tcl       ADP to Tcl Compiler for the ArsDigita Templating System, Based on the original ADP to Tcl compiler by Jon Salz (jsalz@mit.edu) Copyright (C) 1999-2000 ArsDigita Corporation This is free software distributed under the terms of the GNU Public License. 
tcl/query-procs.tcl       Database Query API for the ArsDigita Templating System 
tcl/request-procs.tcl       Database Query API for the ArsDigita Templating System 
tcl/richtext-or-file-procs.tcl       Rich text input widget and datatype for OpenACS templating system. 
tcl/richtext-procs.tcl       Rich text input widget and datatype for OpenACS templating system. 
tcl/spellcheck-procs.tcl       Spell-check library for OpenACS templating system. 
tcl/tab-procs.tcl       Spell-check library for OpenACS templating system. 
tcl/table-procs.tcl       Spell-check library for OpenACS templating system. 
tcl/tag-procs.tcl       Spell-check library for OpenACS templating system. 
tcl/util-procs.tcl       Spell-check library for OpenACS templating system. 
tcl/widget-procs.tcl       Spell-check library for OpenACS templating system. 
tcl/wizard-procs.tcl       Spell-check library for OpenACS templating system. 

Procedures

ad_dimensional       Generate an option bar from an option_list, which has the structure: <pre> { {variable "Title" defaultvalue { {value "Label" {key sql-clause}} ... 
ad_dimensional_sql       Given what clause we are asking for and the joiner this returns the sql fragment 
ad_parse_template       Return a string containing the parsed and evaluated template to the caller. 
ad_return_exception_template       Return an exception template and abort the current script. 
ad_return_template       This function is a wrapper for sundry template:: procs. 
adp_parse_ad_conn_file       handle a request for an adp and/or tcl file in the template system. 
cache       Generic Caching 
cmp_page_filter       Show the compiled template (for debugging) 
dat_page_filter       Show the comments for the template (for designer) 
element       element is really template::element although when in the "template" namespace you may omit the template:: qualifier. 
form       form is really template::form although when in the "template" namespace you may omit the template:: 
get_server_root       Get the server root directory (supposing we run under ACS) 
multirow       multirow is really template::multirow or possibly template::query::multirow depending on context. 
stack_dump       return the whole call stack as HTML 
stack_frame_values       return the variables and arrays of one frame as HTML 
template::add_body_handler       Adds javascript code to an event handler in the body tag. 
template::add_body_script       Add a script to the start of the body section of the document to be returned to the users client. 
template::add_footer       Add a footer include to the end of the document body. 
template::add_header       Add a header include to the beginning of the document body. 
template::add_script        
template::adp_abort       Terminates processing of a template and throws away all output. 
template::adp_array_variable_regexp       The regexp pattern used to find adp array variables in a piece of text (i.e. 
template::adp_array_variable_regexp_literal       adp_array_variable_regexp's pattern augmented by "literal" 
template::adp_array_variable_regexp_noi18n       adp_array_variable_regexp's pattern augmented by "noi18n" 
template::adp_array_variable_regexp_noquote       adp_array_variable_regexp's pattern augmented by "noquote" 
template::adp_compile       Converts an ADP template into a chunk of Tcl code. 
template::adp_eval       Evaluates a chunk of compiled template code in the calling stack frame. 
template::adp_include       return a the output of a Tcl/ADP pair as a string. 
template::adp_level       Get the stack frame level at which the template is being evaluated. 
template::adp_levels        
template::adp_parse_string       Parse string as ADP 
template::adp_variable_regexp       The regexp pattern used to find adp variables in a piece of text, i.e. 
template::adp_variable_regexp_literal       adp_variable_regexp augmented by "literal" 
template::adp_variable_regexp_noi18n       adp_variable_regexp augmented by "noi18n" 
template::adp_variable_regexp_noquote       adp_variable_regexp augmented by "noquote" 
template::data::from_sql::date        
template::data::from_sql::time_of_day        
template::data::from_sql::timestamp        
template::data::to_sql::date        
template::data::to_sql::richtext       Handle richtext transformations using a standardized naming convention. 
template::data::to_sql::time_of_day        
template::data::to_sql::timestamp        
template::data::transform       Dispatch procedure for the transform method. 
template::data::transform::checkbox_text        
template::data::transform::date       Collect a Date object from the form 
template::data::transform::radio_text        
template::data::transform::richtext       Transform the previously-validated submitted data into a two-element list as defined by the richtext datatype. 
template::data::transform::richtext_or_file       Transform submitted data into a valid richtext_or_file data structure (list) 
template::data::transform::search       Process a submitted search widget's data. 
template::data::transform::select_text        
template::data::transform::spellcheck       Tranform submitted and previously validated input into a spellcheck datastructure. 
template::data::transform::textdate       Collect a textdate from the form, it automatically reformats it from the users locale to the iso standard YYYY-MM-DD this is useful because it doesn't need reformatting in Tcl code 
template::data::transform::time_of_day       Collect a time_of_day object from the form 
template::data::transform::timestamp       Collect a timestamp object from the form 
template::data::validate       This proc invokes the validation code for a given type. 
template::data::validate::boolean       Validates boolean data types. 
template::data::validate::checkbox_text       validate a checkbox_other datatype 
template::data::validate::currency       form validation for currency type. 
template::data::validate::date       Validate that a submitted date conforms to the template system's notion of what a date should be. 
template::data::validate::email       Validate that a submitted email address is syntactically correct. 
template::data::validate::enumeration       Validate enumeration as a unique csv alphanum list. 
template::data::validate::file       Our file widget can't fail 
template::data::validate::filename       Validate that a submitted filename consists of alphanumeric, "_", or "-" characters. 
template::data::validate::float       Validate that a submitted fla contains only an optional sign, and a whole part and fractional part. 
template::data::validate::integer       Validate that a submitted integer contains only an optional sign and the digits 0-9. 
template::data::validate::keyword       Validate that a submitted keyword consists of alphnumeric or "_" characters. 
template::data::validate::naturalnum       Validates natural numbers data types. 
template::data::validate::number       Validate number - any float - should be any rational number? 
template::data::validate::party_search       Validate the party search entry form. 
template::data::validate::radio_text       validate a radio_other datatype 
template::data::validate::richtext       Validate richtext after form submission. 
template::data::validate::richtext_or_file       Validate submitted richtext_or_file by checking that the format is valid, HTML doesn't contain illegal tags, etc. 
template::data::validate::search       It was necessary to declare a datatype of "search" in order for the transformation to be applied correctly. 
template::data::validate::select_text       validate a select_text datatype 
template::data::validate::string       Validate that a submitted string is valid. 
template::data::validate::text       Validate that submitted text is valid. 
template::data::validate::textdate       Validate that a submitted textdate if properly formatted. 
template::data::validate::time_of_day       Validate time of day. 
template::data::validate::timestamp       Validate that a submitted date conforms to the template system's notion of what a date should be. 
template::data::validate::url       Validate that a submitted url is correct. 
template::data::validate::url_element       Beautiful URL elements that may only contain lower case characters, numbers and hyphens. 
template::element       Manage elements of form objects. 
template::element::create       Append an element to a form object. 
template::element::error_p       Return true if the named element has an error set. 
template::element::exists       Determine if an element exists in a specified form 
template::element::get_property       Retrieves the specified property of the element, such as value, datatype, widget, etc. 
template::element::get_value       Retrieves the current value of an element. 
template::element::get_values       Retrieves the list current values for an element. 
template::element::querygetall       Get all values for an element, performing any transformation defined for the datatype. 
template::element::set_error       Manually set an error message for an element. 
template::element::set_properties       Modify properties of an existing element. 
template::element::set_value       Sets the value of an element 
template::element::set_values       Sets the list of values of an element 
template::expand_percentage_signs       Expand variables marked with percentage signs in caller's scope. 
template::filter       Run any filter procedures that have been registered with the templating system. 
template::form       template::form command invokes form functions. 
template::form::create       Initialize the data structures for a form. 
template::form::exists       Determine whether a form exists by checking for its data structures. 
template::form::export       Generates hidden input tags for all values in a form submission. 
template::form::get_action       Find out which action is in progress. 
template::form::get_button       Find out which button was clicked 
template::form::get_combined_values       Return a list which represents the result of getting combined values from multiple form elements 
template::form::get_elements       Return a list of element names for the form with given id. 
template::form::get_errors        
template::form::get_properties       Get properties of a form 
template::form::get_values       Set local variables for form variables (assume they are all single values). 
template::form::is_request       Return true if preparing a form for an initial request (as opposed to repreparing a form that is returned to the user due to validation problems). 
template::form::is_submission       Return true if a submission in progress. 
template::form::is_valid       Return true if submission in progress and submission was valid. 
template::form::section       Set the current section (fieldset) of the form. 
template::form::set_error       Set an error on a form element. 
template::form::set_properties       Set properties for a form 
template::form::set_values       Convenience procedure to set individual values of a form (useful for simple update forms). 
template::form::size        
template::forward       Redirect and abort processing if "template::forward your_url t" is used. 
template::get_body_event_handlers       Get body event handlers specified with template::add_body_handler 
template::get_datasources       Assemble directives into data source(s) for presentation. 
template::get_footer_html       Get footers as a chunk of html suitable for insertion into blank-master.adp Called only from blank-master.tcl 
template::get_header_html       Get headers as a chunk of html suitable for insertion into blank-master.adp Called only from blank-master.tcl 
template::get_mime_header_preamble        
template::get_mime_template_extension        
template::get_mime_type       gets the mimetype from the outputheaders and if missing guesses text/html 
template::get_resource_path       Get the template directory The body is doublequoted, so it is interpreted when this file is read 
template::head::add_css       Add a link tag with relation type 'stylesheet' or 'alternate stylesheet', and type 'text/css' to the head section of the document to be returned to the users client. 
template::head::add_javascript       Add a script of type 'text/javascript' to the head section of the document to be returned to the users client. 
template::head::add_link       Add a link tag to the head section of the document to be returned to the users client. 
template::head::add_meta       Add a meta tag to the head section of the document to be returned to the users client. 
template::head::add_script       Add a script to the head section of the document to be returned to the users client. 
template::head::add_style       Add an embedded css style declaration 
template::head::prepare_multirows       Generate multirows for meta, css, scripts Called only from blank-master.tcl 
template::list::create       Defines a list to be diplayed in a template. 
template::list::csv_quote       Quote a string for inclusion as a csv element 
template::list::element::create       Adds an element to a list builder list. 
template::list::element::get_property        
template::list::element::get_reference       upvar the list element to the callers scope as $local_name 
template::list::element::get_refname        
template::list::element::set_properties       Set a list of properties in array get format for the given list template. 
template::list::element::set_property       Set a property in the named list template. 
template::list::element_select_clauses        
template::list::element_where_clauses        
template::list::filter::create       Adds a filter to a list builder list. 
template::list::filter::exists_p       Determine if a given filter exists for a given list template. 
template::list::filter::get_property       Return a property from a given list and filter. 
template::list::filter::get_reference       Build a reference to the given filter for the given list template. 
template::list::filter::get_refname       Build a canonical name from a list and filter name. 
template::list::filter::set_properties       Set multiple properties for the given list and filter from a list in array get format. 
template::list::filter::set_property       Set a property for the given list and filter. 
template::list::filter_from_clauses        
template::list::filter_select_clauses        
template::list::filter_where_clauses        
template::list::format::create       Adds a format to a list builder list. 
template::list::from_clauses        
template::list::get_reference       Bind an upvar reference to a variable at the template parse level to a local variable, optionally giving an error message if it doesn't exist. 
template::list::get_refname       Return a canonical name for the given list template. 
template::list::get_rowcount       Gets the full number of rows retrieved from this template::list. 
template::list::multirow_cols       Get the list of columns to order by, if ordering in web server. 
template::list::orderby::create       Adds an orderby to a list builder list. 
template::list::orderby::get_property       Get a property from an orderby filter for a list template. 
template::list::orderby::get_reference       Build a local reference to an orderby filter for a named list template. 
template::list::orderby::get_refname       Build a canonical name from a list and orderby filter. 
template::list::orderby::set_properties       Set multiple properties for the given orderby filter in the given list template from a list in array get format. 
template::list::orderby::set_property       Set a property for an orderby filter in the given list template. 
template::list::orderby_clause       Get the order by clause for use in your DB query, or returns the empty string if not sorting in the DB. 
template::list::page_get_ids        
template::list::page_get_rowcount       Gets the number of rows across all pages in a paginated result set. 
template::list::page_where_clause        
template::list::prepare       Prepare list for rendering 
template::list::set_elements_property       Sets a property on multiple list elements 
template::list::util_html_to_attributes_string       Takes a list in array get format and builds HTML attributes from them. 
template::list::write_csv       Writes a CSV to the connection 
template::list::write_output       Writes the output to the connection if output isn't set to template. 
template::multirow       Create/Manipulate a multirow datasource (for use with &lt;multiple&gt; tags) <dl> <dt> <b>template::multirow create datasourcename column [column ...]</b></dt> <dd> creates a multirow datasource of datasourcename </dd> <dt> <b>template::multirow extend datasourcename column [column ...] </b></dt> <dd> extend adds a column to an existing multirow</dd> <dt> <b>template::multirow append datasourcename value [value ...]</b></dt> <dd> appends the row to an existing multirow.</dd> <dt> <b>template::multirow pop datasourcename </b></dt> <dd> pops a row off an existing multirow, returning a list of the rows keys gand values</dd> <dt> <b>template::multirow size datasourcename</b></dt> <dd> returns the rowcount</dd> <dt> <b>template::multirow columns datasourcename</b></dt> <dd> returns the columns in the datasource</dd> <dt> <b>template::multirow get datasourcename rownum [column]</b></dt> <dd> returns the row of of data (or the particular row/column if column is provided)</dd> <dt> <b>template::multirow set datasourcename rownum column value</b></dt> <dd> set an element value</dd> <dt> <b>template::multirow foreach datasource code </b></dt> <dd> evaluate code block for each row (like db_foreach)</dd> <dt> <b>template::multirow upvar datasource [new_name]</b></dt> <dd> upvar the multirow, aliasing to new_name if provided</dd> <dt> <b>template::multirow unset datasource</b></dt> <dd> unset multirow</dd> <dt> <b>template::multirow sort datasource -lsort-switch -lsort-switch col1 col2</b></dt> <dd> Sort the multirow by the column(s) specified. 
template::paginator       pagination object. 
template::paginator::create       Creates a paginator object. 
template::paginator::get_all_row_ids       Gets a list of IDs in the master ID list generated by the initial query submitted for pagination. 
template::paginator::get_context       Gets the context cues for a set of pages in the form of a multirow data source with 3 columns: rownum (starting with 1); page (number of the page); and context (a short string such as the first few letters of a name or title). 
template::paginator::get_data       Sets a multirow data source with data for the rows on the current page. 
template::paginator::get_display_info       Make paginator display properties available as a onerow data source: <table> <tr> <td>next_page:</td> <td>following page or empty string if at end</td> </tr> <tr> <td>previous_page:</td> <td>preceeding page or empty string if at beginning</td> </tr> <tr> <td>next_group:</td> <td>page that begins the next page group or empty string if at end</td> </tr> <tr> <td>previous_group:</td> <td>page that begins the last page group or empty string if at endl.</td> </tr> <tr> <td>page_count:</td> <td>the number of pages</td> </tr> </table> 
template::paginator::get_full_row_count       Gets the total number of records returned by the original paginator query. 
template::paginator::get_group       Calculates the page group in which the specified page is located. 
template::paginator::get_group_count       Gets the total number of groups in the paginated query 
template::paginator::get_groups       Determines the set of groups to which a group belongs, and calculates the starting page of each group in that set. 
template::paginator::get_page       Calculates the page on which the specified row is located. 
template::paginator::get_page_count       Gets the total number of pages in the paginated query 
template::paginator::get_pages       Gets a list of pages in a group, truncating if appropriate at the end. 
template::paginator::get_pages_info       Gets the page information for a set of pages in the form of a multirow data source with 2 columns: rownum (starting with 1); and page (number of the page). 
template::paginator::get_query       Returns a query with the data for the rows on the current page. 
template::paginator::get_row       Calculates the first row displayed on a page. 
template::paginator::get_row_count       Gets the total number of records in the paginated query 
template::paginator::get_row_ids       Gets a list of IDs in a page, selected from the master ID list generated by the initial query submitted for pagination. 
template::paginator::get_row_last       Calculates the last row displayed on a page. 
template::paginator::reset       Resets the cache for a query. 
template::parse_directives       Parse out directives embedded in the code parameter. 
template::query       Public interface to template query api. 
template::query::iterate        
template::register_mime_type       sets the template_extension and template_header_preamble nsv's with the provided data. 
template::request       Dispatch procedure for requests. 
template::request::create       Create the request data structure. 
template::request::error       Manually report request error(s) by setting error messages and then calling is_valid to handle display. 
template::request::get_param       Retrieves the value(s) of the specified parameter. 
template::request::is_valid       Checks for any param errors. 
template::request::set_param       Declares a query parameter as part of the page request. 
template::resource_path       Process the templating "style" and return the stub (path without extensions). 
template::set_file       Set the path of the template to render. 
template::streaming_template       Return the path of the streaming template 
template::tabstrip       Dispatch procedure for tabstrip. 
template::tabstrip::add_tab       Add a tab to the given tabstrip. 
template::tabstrip::create       Create a tabstrip, which is a UI tool consisting of a set of clickable tabs. 
template::tabstrip::set_current_tab       Set the current tab (to be highlighted as a cue for the user) in the given tabstrip. 
template::themed_template       Given a path like /packages/acs-admin/www/index pointing to an .adp file, this function tries to locate this path in the ResourceDir of the subsite (determined by the theme). 
template::url        
template::util::array_to_vars       Declare local variables for every key in an array. 
template::util::checkbox_text::get_property        
template::util::clear_cookie       Expires an existing cookie. 
template::util::currency       Dispatch procedure for the currency object 
template::util::currency::acquire       Create a new currency value with some predefined value Basically, create and set the currency value 
template::util::currency::create       Create a currency form element. 
template::util::currency::get_property       Return a property of a currency list which was created by a currency widget. 
template::util::currency::set_property       Set a currency value to a set value, with that value being of "what" form. 
template::util::date       Dispatch procedure for the date object 
template::util::date::acquire       Create a new date with some predefined value Basically, create and set the date 
template::util::date::add_time       set the time and date and new format properties into one date object (list) which is returned not sure this proc should live here... 
template::util::date::compare       Perform date comparison; same syntax as string compare 
template::util::date::create       Create a new Date object I chose to implement the date objects as lists instead of arrays, because arrays are not first-class in Tcl 
template::util::date::daysInMonth        
template::util::date::defaultInterval       Get the default ranges for all the numeric fields of a Date object 
template::util::date::from_ansi       Create a new templating system date structure from a full ANSI date, i.e. 
template::util::date::get_property       Returns a property of a date list, usually created by ad_form. 
template::util::date::init       Sets up some initial variables and other conditions to facilitate the data structure template::util::date working properly and completely. 
template::util::date::monthName       Return the specified month name (short or long) 
template::util::date::now       Create a new Date object for the current date and time 
template::util::date::now_min_interval       Create a new Date object for the current date and time with the default interval for minutes 
template::util::date::now_min_interval_plus_hour       Create a new Date object for the current date and time plus one hour with the default interval for minutes 
template::util::date::set_property       Replace a property in a list created by a date widget. 
template::util::date::today       Create a new Date object for the current date 
template::util::date::unpack       Set the variables for each field of the date object in the calling frame. 
template::util::date::validate       Validate a date object. 
template::util::file::get_property       Return a property from a file datatype structure. 
template::util::file_transform       Helper proc, which gets AOLserver's variables from the query/form, and returns it as a 'file' datatype value. 
template::util::get_cookie       Retrieve the value of a cookie and return it Return the default if no such cookie exists 
template::util::get_opts       Builds an array named "opts" in the calling frame, containing all switches passed at the end of a proc. 
template::util::get_param       Retreive a stored parameter, or "" if no such parameter If section/key are present, read the parameter from the specified section.key in the INI file, and cache them under the given name 
template::util::get_url_directory       Get the directory portion of a URL. 
template::util::is_nil       Determines whether a variable both exists and is not an empty string. 
template::util::is_true       interprets its argument as a boolean. 
template::util::is_unique       Queries a database table for the existence of a particular row. 
template::util::leadingPad       Pad a string with leading zeroes 
template::util::leadingTrim       Trim the leading zeroes from the value, but preserve the value as "0" if it is "00" 
template::util::list_of_lists_to_array       Converts a list of lists in the form { { key value } { key value } ... 
template::util::list_of_ns_sets_to_multirow       Transform a list of ns_sets (most likely produced by db_list_of_ns_sets into a multirow datasource. 
template::util::list_opts       Converts an array to an option list 
template::util::list_to_array       Converts a list of values into an array, using a list of corresponding column names for the array keys. 
template::util::list_to_lookup       Turn a list into an array where each key corresponds to an element of the list... 
template::util::list_to_multirow       populate a multirow data source from a list string gotten from a call to template::util::multirow_to_list 
template::util::lnest       Recursive procedure for building a hierarchical or multidimensional data structure in a list. 
template::util::lpop       Removes the last item from a list. 
template::util::master_to_file       Resolve a URL into an absolute file path, but respect styled master configuration for named masters (e.g. 
template::util::multirow_foreach       runs a block of code foreach row in a multirow. 
template::util::multirow_quote_html       implements template::util::quote_html on the designated column of a multirow 
template::util::multirow_to_list       generate a list structure representitive of a multirow data source <b>NB:</b> if the multirow is generated by db_multirow, db_multirow must be called with the -local option 
template::util::negative       Check if a value is less than zero, but return false if the value is an empty string 
template::util::number_list       Return a list of numbers, {1 2 3 ... 
template::util::nvl       Analogous to SQL NVL 
template::util::quote_html       Quote possible HTML tags in the contents of the html parameter. 
template::util::radio_text::get_property        
template::util::read_file       Reads a text file. 
template::util::resolve_directory_url       Resolve the file name for a directory URL 
template::util::richtext       Dispatch procedure for the richtext object 
template::util::richtext::acquire       Create a new richtext value with some predefined value Basically, create and set the richtext value 
template::util::richtext::create       Create a richtext widget 
template::util::richtext::format_options       Returns a formatting option list 
template::util::richtext::formats       Returns a list of valid richtext formats 
template::util::richtext::get_property       Get a property of the richtext datatype. 
template::util::richtext::set_property       Set a property of the richtext datatype. 
template::util::richtext_or_file       Dispatch procedure for the richtext_or_file object 
template::util::richtext_or_file::acquire       Create a new richtext_or_file value with some predefined value Basically, create and set the richtext_or_file value 
template::util::richtext_or_file::create       Create a richtext_or_file datastructure. 
template::util::richtext_or_file::format_options       Returns a formatting option list 
template::util::richtext_or_file::formats       Returns a list of valid richtext_or_file formats 
template::util::richtext_or_file::get_property       Get a property of the richtext_or_file datatype. 
template::util::richtext_or_file::set_property       Set a property of the richtext_or_file datatype. 
template::util::select_text::get_property        
template::util::set_cookie       Create a cookie with specified parameters. 
template::util::set_file_encoding       Set encoding of the given file channel based on the OutputCharset parameter of AOLserver. 
template::util::set_param       Set a stored parameter 
template::util::set_to_list       Turns an ns_set into a key-value list, excluding any number of specified keys. 
template::util::set_to_vars       Declare local variables for set values 
template::util::spellcheck       Dispatch procedure for the spellcheck object 
template::util::spellcheck::get_element_formtext        
template::util::spellcheck::get_sorted_list_with_unique_elements       Converts a list of possibly duplicate elements (words) into a sorted list where no duplicates exist. 
template::util::spellcheck::merge_text       Returns the merged (possibly corrected) text or the empty string if it is not time to merge. 
template::util::spellcheck::spellcheck_properties       Returns a list of spellcheck properties in array setable format. 
template::util::tcl_to_sql_list       Convert a Tcl list to a SQL list, for use with the "in" statement. 
template::util::textdate       Dispatch procedure for the textdate object 
template::util::textdate::create       Build a textdate datatype structure, which is just the string itself for this simple type. 
template::util::textdate_localized_format       Gets the localized format for the textdate widget 
template::util::time_of_day::get_property       Replace a property in a list created by a time_of_day widget. 
template::util::time_of_day::set_property       get a property in a list created by a time_of_day widget. 
template::util::timestamp::get_property       Replace a property in a list created by a timestamp widget. 
template::util::timestamp::set_property       get a property in a list created by a timestamp widget. 
template::util::url_to_file       Resolve a URL into an absolute file path. 
template::util::vars_to_array       Place local variables into an array 
template::util::write_file       Writes a text file 
template::verify_datasources        
template::widget       The template::widget namespace contains the code for the various input widgets. 
template::widget::ampmFragment       Create a widget that shows the am/pm selection 
template::widget::attachment       Render an attachment input widget. 
template::widget::block       Widget for blocks of radio-buttoned questions 
template::widget::button       Render a button input widget. 
template::widget::checkbox       Render a checkbox input widget. 
template::widget::checkbox_text       Implements the complex widget checkbox_other which combines a checkbox widget with a text widget 
template::widget::comment       Render a comment widget. 
template::widget::currency       Render a currency widget. 
template::widget::date       Create a date entry widget according to a format string The format string should contain the following fields, separated by / \ - : . 
template::widget::dateFragment       Create an input widget for the given date fragment If type is "t", uses a text widget for the fragment, with the given size. 
template::widget::file       Generate a file widget. 
template::widget::hidden        
template::widget::inform       A static information widget that does not submit any data 
template::widget::input       General proc used by a wide variety of widgets to output input HTML tags. 
template::widget::menu       Render a menu widget (a "select" dropdown menu by default). 
template::widget::monthFragment       Create a month entry widget with short or long month names 
template::widget::multiselect       Render a select widget which allows any number of values to be selected. 
template::widget::numericRange       Create an html fragment to display a numeric range widget interval_def is in form { start stop interval } 
template::widget::numericrange       Widget proc usable with ad_form, need to define interval_def as {interval_def {start end step}} 
template::widget::party_search       A widget that searches for parties (persons, groups and relational_segments) and lets the user select one from the search results. 
template::widget::password       Generate a password input widget. 
template::widget::radio       Render a radio input widget. 
template::widget::radio_text       Implements the complex widget radio_text which combines a radio widget with a text widget 
template::widget::richtext       <p> Implements the richtext widget, which offers rich text editing options. 
template::widget::richtext_htmlarea       Implements the richtext widget, which offers rich text editing options. 
template::widget::richtext_or_file       Render a richtext_or_file widget 
template::widget::search       Return a widget consisting of either a search box or a search pull-down list. 
template::widget::select       Render a select widget which allows only one value to be selected. 
template::widget::select_text       Implements the complex widget select_text which combines a select widget with a text widget 
template::widget::submit       Render a submit input widget. 
template::widget::tab       Widget to create one tab in a set of tabs ("tabstrip") in the tabbed UI. 
template::widget::table::create       Create a table widget 
template::widget::table::default_column_def       Create the default column definition if none exists 
template::widget::table::get_params       Get the order by clause for the widget, other parameters (?) 
template::widget::table::prepare       Compose the query, if neccessary, and define the datasources 
template::widget::text       Generate a text widget (not to be confused with textarea) 
template::widget::textarea       A widget for the HTML form input textarea element. 
template::widget::textdate       Implements the textdate widget. 
template::widget::time_of_day       Render a time_of_day widget. 
template::widget::timestamp       Render a timestamp widget. 
template::wizard       alias proc to call the real template::wizard::proc 
template::wizard::create       <pre>example: template::wizard create -action "wizard" -name my_wizard -params { my_param1 my_param2 } -steps { 1 -label "Step 1" -url "step1" 2 -label "Step 2" -url "step2" 3 -label "Step 3" -url "step3" } </pre> <ul> <li>action - the url where the wizard will always submit, normally its the same as your current wizard file. 
template::wizard::exists        
template::wizard::forward       call when a step has been validated and completed. 
template::wizard::get_action_url       Retreive the URL to the action 
template::wizard::get_current_name       get the current wizard name 
template::wizard::get_current_step       <p>Set the step to display for this particular request This is determined by the wizard_step parameter. 
template::wizard::get_forward_url       Build the redirect URL for the next step 
template::wizard::get_param       <p>Get a wizard's param value</p> <p> "template::wizard get_param" has the advantage over ad_page_contract of getting the param value during the response time. 
template::wizard::get_visited_step       get the last visited step 
template::wizard::load_last_visited_step       loads the last visited step from the db 
template::wizard::save_last_visited_step       saves the last visisted step to the db 
template::wizard::set_finish_url       <p>if the finish url is set, when a the finish button is pressed it will redirect to this url</p> 
template::wizard::set_param       <p>Set a wizard's param for passthrough</p> <p>Normally you place this in the steps of the wizard where the form has been processed. 
template::wizard::set_visited_step       set the last visited step 
template::wizard::submit       <p>Add the appropriate buttons to the submit wizard Also create a list of all the buttons The optional -buttons parameter is a list of name-value pairs, in form {name label} {name label...} The valid button names are back, next, repeat, finish</p> <p>Also writes the params to the form as hidden elements to keep the state of the wizard.</p> <p>The following values are acceptable for the buttons: back, next and finish. 
template_tag       Generic wrapper for registered tag handlers. 
template_tag_if_concat_params       append all the tags together and then eval as a list to restore quotes 
template_tag_if_interp_expr       Interpret an expression as part of the simplified IF syntax 
watch_files       tracks each file by interpreter to ensure that it is up-to-date 

SQL Files

sql/postgresql/acs-templating-create.sql        
sql/postgresql/acs-templating-drop.sql        
sql/postgresql/demo-create.sql        
sql/postgresql/demo-drop.sql        
sql/postgresql/template-demo-notes-create.sql        
sql/postgresql/template-demo-notes-drop.sql        
sql/postgresql/template-demo-notes-sample.sql        

Content Pages

www/
     admin/
          test/
                chain-frac-0.tcl transform a real number into a chain fraction
                chain-frac-1.adp
                chain-frac-1.tcl transform a real number into a chain fraction
                chain-frac-2.adp
                if.adp
                if.readme
                if.tcl test the <if> tag
                include-0.adp
                include-0.tcl test <if> (simple) and recursive <include>, generating more demanding testcase for <if>
                include.adp
                include.tcl
     scripts/
          xinha/
                Makefile
                attach-file.adp
                attach-file.tcl Simple file upload, attach image to object_id passed in, if no object_id, use the current package_id
                attach-image.adp
                attach-image.tcl Simple image upload, attach image to object_id passed in, if no object_id, use the current package_id
                file-selector.adp
                file-selector.tcl
                insert-file-orig.adp
                insert-ilink.adp
                insert-ilink.tcl
                insert-image.adp
                insert-image.tcl
 
  Contact Us
  Project Open Business Solutions S.L.

Calle Aprestadora 19, 12o-2a

08902 Hospitalet de Llobregat (Barcelona)

Spain

 Tel Europe: +34 609 953 751
 Tel US: +1 415 200 2465
 Mail: info@project-open.com