XactCommerce Xact Objects
Home
News
XactCommerce
Typical Applications
Custom Development
Private Backend
XactScript Language
Performance
Deployment
Partners
Portfolio
About Us
leXml Language < Interface Modules & Commands < If_CategoryListV1

If_CategoryListV1
If_CategoryListV1 lists category information

categoryexpandablelist
Dumps category list as an expandable hierarchy
 
Optional values:
owner_id - Constrain to this owner ID (default=none)
openimage - URL path (relative or absolute) to image to use for expanded hierarchies
closedimage - URL path to use for closed hierarchies
selectfunction - When a category is selected, this function will be called with the category representation. (default=alert) (No parentheses should be given with the function name)
 
If closedimage and/or openimage are not specified, defaults will be used.
If closedimage is 'none' then no images will be used.
 
Returns 'ok' or 'error:...'.


categoryfulloptionslist
Dumps category list as a list of options
 
Optional values:
owner_id - Constrain to this owner ID (default=none)
 
Returns 'ok' or 'error:...'


categoryoptionslist
This lists a particular category or subcategory of a category as a series of options.
 
Optional values:
owner_id - Constrain to this owner ID (default=none)
category - Category specification (default=*)
 
Example: category=Pants or category=Pants:* would lists all under Pants category=* would list all top-level categories, etc.
 
Returns 'ok' or 'error:...'.


templatecategorylist
This command allows a page author to create highly customizable category lists by actually creating the javascript and code themselves.
 
The arguments to this command are:
Required arguments: (see below for details about patterns)
startsubcatpattern - Pattern to start a new subcategory with
endsubcatpattern - Pattern to end a new subcategory with
treeleafpattern - Pattern to use to output the 'leaves' of the tree (the real clickable categories)
 
Optional arguments:
owner_id - Constrain to this owner ID (default=none)
category - Category mask (default=* for all categories and subcats)
indentstring - String used for ##INDENT## (default='  ')
 
Patterns are blocks of character data on which a special search and replace will be performed with certain predefined tokens to substitute things like category names. To pass large blocks as arguments, first define them to variables with lexml_set and then use $variable to pass them (since you can't pass a multiline argument in an argument body).
 
The patterns that will be searched and replaced are:
##CATEGORY## - Will be replaced with the full category spec e.g. c:sc:...
##CATEGORYNAME## - Name of the current category or subcategory
##URLCATEGORY## - URLencoded category spec
##URLCATEGORYNAME## - URLencoded category name
##RAND1##
##RAND2##
##RAND3##
##RAND4## - These will be replaced with random 8-character strings
##INDENT## - Series of indentstring corresponding to depth
 
Returns 'ok' or 'error:...'


templatecategorylist2
simple implementation of the category list
uses template