Monday 27 October 2003 1:40:08 am
Maybe somebody can help me. As a Web developer on other platforms, I've been in many situations where it made sense to sort data on the basis of some category field, then display the data broken down by that category. For example, let's say I have a 5-record result set that looks like this:
Company: Productos AC Country: Spain
Company: ABC, Inc. Country: U.S.
Company: XYZ Gmbh. Country: Germany
Company: Acme Enterprises Country: U.S.
Company: Gonzales, SA Country: Spain Now, if I return this data sorted by country, in a language like PHP I could create a loop, and store the country name in a buffer variable before moving to the next iteration, then I'd compare the buffer country value to the current country value, and if it's different, create a delimiter (---------) in the display. So the output would look like this:
XYZ Gmbh. - Germany
------------
Gonzales SA - Spain
Productos AC - Spain
------------
ABC Inc. - U.S. Acme Enteprises - U.S. In EZPublish, while I can sort the data appropriately, it seems I don't have enough control within the looping structure to accomplish this. I have a loop that looks like this:
{section name=Child loop=fetch(content, list, hash(
parent_node_id, $node.node_id,
limit, $page_limit,
offset, $view_parameters.offset,
sort_by,array(array('attribute',true(),215)),
class_filter_type, include,
class_filter_array, array( 18 ) ) )}
$Child:item.data_map.country.data_text}
{/section}
Is there anything I can do here to accomplish my goal?
|