Name

item-list — iterate through items in the cart

ATTRIBUTES

Attribute Pos. Req. Default Description
cart main name of cart to iterate through
reverse display items in reverse order
prefix item
more No enable paginating with [more_list]
ml 50 number of items to display
more_template template for [more_list]
form form parameters embedded into more links
more_routine custom routine for [more_list]
interpolate     0 interpolate input?
reparse     1 interpolate output?

DESCRIPTION

BEHAVIOR

This tag does not appear to be affected by, or affect, the rest of Interchange.

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

item-list is available in Interchange versions:

4.6.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: code/SystemTag/item_list.coretag
Lines: 38


# Copyright 2002-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: item_list.coretag,v 1.7 2007-03-30 23:40:49 pajamian Exp $

UserTag item-list           Order        name
UserTag item-list           addAttr
UserTag item-list           attrAlias    cart name
UserTag item-list           attrAlias    space discount_space
UserTag item-list           hasEndTag
UserTag item-list           Version      $Revision: 1.7 $
UserTag item-list           Routine      <<EOR
sub {
my($cart,$opt,$text) = @_;
return if ! $text;
my $items = $cart ? ($::Carts->{$cart} ||= []) : $Vend::Items;

my $oldspace;
$oldspace = Vend::Interpolate::switch_discount_space($opt->{discount_space})
  if defined $opt->{discount_space};

$items = [ reverse @$items ] if $opt->{reverse};
my $obj = { mv_results => $items };
$opt->{prefix} = 'item' unless defined $opt->{prefix};
# LEGACY
list_compat($opt->{prefix}, \$text);
# END LEGACY

# store the output temporarily, as we need to switch back to the old discount space...
my $output = labeled_list($opt, $text, $obj);
Vend::Interpolate::switch_discount_space($oldspace) if defined $oldspace;
return $output;
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!