Dialogs Framework Basic Concepts
Dialogs Lists: Displaying on a Page
Updated: 21 Apr 2023
List templates describe the HTML for showing the items in a list, which items to display, and in what order to show them. List template names begin with 'list_' and end with a period. List templates may be "called" (or "embedded") in the following contexts:
- In the text (WYSIWYG) areas of a page by entering the name of the list template like this:
...
<div id="my_list">list_my_list_tpl_name.</div>
... - In Page Templates (to show a list on all pages that use that Page Template) by calling the function
Show_List
within php tags as follows:...
<? echo $this->Show_List('list_my_list_tpl_name.'); ?>
... - In List Templates (one list template calling another) by calling the function
Show_List
within php tags as follows:...
$html .= $this->Show_List('list_my_list_tpl_name.');
...
The Show_List()
function also takes an optional second parameter: $options
. $options
is an array which can contain name/value pairs of any list template fields. The most common is 'view_where' which is the 'Where' field for a list template. For example:
...
$html .= $this->Show_List('list_my_list_tpl_name.', array('view_where'=>"item_id='" . (int)$_GET['item_id'] . "'"));
...
Some other useful ones are:
- item_name
- list_header
- item_format
- list_footer
- empty_msg
- view_limit
- view_paging
- paging_format
- paging_at_start
- paging_at_end
- detail_format
- empty_cells
- stats_sql
- table_name
- view_fields
- view_sort
- view_treeview
- view_limit_by_user
- view_id
- view_group_by
- view_having
- view_debug
- view_list_name