template::list::format::create (public)

 template::list::format::create -list_name list_name \
    -format_name format_name [ -selected_format selected_format ] \
    -spec spec [ -ulevel ulevel ]

Defined in packages/acs-templating/tcl/list-procs.tcl

Adds a format to a list builder list.

This proc shouldn't be called directly, only through template::list::create.

These are the available properties in the spec:

  • label: The label.
  • layout: The layout, can be 'table' or 'list'.
  • style: The name of the template to used to render this format. Defaults to the name of the layout, and can be overridden in the ADP file.
  • output: Output format, can be either 'template' or 'csv'. If 'csv'. then the output is streamed directly to the browser and not through the templating system, but you have to call template::list::write_output from your page to make this work.
  • page_size: The page size for this format. Leave blank to use the list's page size.
  • elements: 'table' layout: An ordered list of elements to display in this format.
  • row: 'table' layout: For more complex table layout, you can specify each row individually. The value is an array-list of ( element_name spec ) pairs. You can have more than one 'row' property, in which case your output table will have more than one HTML table row per row in the data set. In the 'spec' part of each element listed in the row, you can specify properties that override the properties defined in the -elements section of template::list::create, thus changing the label, link, display_col, etc.
  • template: 'list' layout: An ADP chunk to be used for display of each row of the list. Use <listelement name="element_name"> to output a list element in your template.

Switches:
-list_name
(required)
Name of list.
-format_name
(required)
Name of the format.
-selected_format
(optional)
-spec
(required)
The spec for this format. This is an array list of property/value pairs, where the right hand side is 'subst'ed in the caller's namespace, except for *_eval properties, which are 'subst'ed inside the multirow.
-ulevel
(defaults to "1") (optional)
Where we should uplevel to when doing the subst's. Defaults to '1', meaning the caller's scope.

Partial Call Graph (max 5 caller/called nodes):
%3 template::list::create template::list::create (public) template::list::format::create template::list::format::create template::list::create->template::list::format::create template::adp_level template::adp_level (public) template::list::format::create->template::adp_level template::list::element::get_reference template::list::element::get_reference (public) template::list::format::create->template::list::element::get_reference template::list::element::set_properties template::list::element::set_properties (public) template::list::format::create->template::list::element::set_properties template::list::get_reference template::list::get_reference (public) template::list::format::create->template::list::get_reference

Testcases:
No testcase defined.
[ show source ]
Show another procedure: