Home > Contents > Index >
Template Tags TOC   |    Alpha TOC   |    Tag Family TOC   |    Purpose TOC   |    Annotated TOC   |    Index 

 

assetset:getmultiplevalues

Scatters attribute values from several attributes (and potentially more than one product) into several specified lists. This tag executes a single SQL query in order to perform its function. (It is therefore much more efficient than using assetset:getattributevalues repeatedly for multiple attribute values.)

Syntax

Parameters

name (required)
Input parameter. Name of the assetset object.

list (optional)
Input parameter (see as output, below). List of attribute names to scatter. This list has three columns:

byasset (optional)
Input parameter. Boolean value indicating whether to scatter a different instance of each attribute for each individual asset in the assetset (true), or to group all the attribute values for all assets together into one list per attribute (false). The default is false.

immediateonly (optional)
Input parameter. Boolean value indicating whether to scatter inherited attribute values or not. A false value indicates that inherited values should be scattered (the default).

prefix (required)
Input parameter. Starting part of the list names that this method creates.

Description

If byasset is false, creates a set of lists with the names: prefix:attrname. If byasset is true, creates a set of lists with the names: prefix:assetid:attrname.

This tag is highly efficient in that it executes a single query to retrieve all values. We therefore recommend using this tag wherever possible instead of multiple instances of assetset:getattributevalues.

We recommend using assetset:getmultiplevalues when the goal is to display a fixed-format table of assets, or to obtain many attributes of a single asset (such as for a product detail page).

assetset:getmultiplevalues has the following limitations:

NOTE: This tag also causes dependencies to be recorded for all assets that contribute to the returned lists, or if this assetset object is not an enumerated one, then the equivalent of render:unknowndeps will be performed.

Note

The ordering values ascending and descending operate in the reverse manner from what might be logically expected. Therefore, if ascending order is specified, the ordinally lowest value will occur last in the result list.

Example

This example reads two attribute values from the assetset object myassetset, "lumens" and "bulbsize". Since the byasset attribute is not specified, the result will be two lists, one for each attribute: ValueList:lumens and ValueList:bulbsize.

See Also

assetset:getattributevalues
assetset:sortlistentry

listobject:create
listobject:addrow
listobject:tolist

  Home > Contents > Index >

FatWire JSP Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.