[interchange-cvs] interchange - heins modified lib/Vend/Menu.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Sat Dec 6 08:49:42 EST 2003
User: heins
Date: 2003-12-06 13:49:42 GMT
Modified: lib/Vend Menu.pm
Log:
* Add code which tells you which is the last row in the menu. Improves
ability to add spacers and other HTML formatting.
Revision Changes Path
2.37 +10 -2 interchange/lib/Vend/Menu.pm
rev 2.37, prev_rev 2.36
Index: Menu.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Menu.pm,v
retrieving revision 2.36
retrieving revision 2.37
diff -u -r2.36 -r2.37
--- Menu.pm 23 Nov 2003 16:42:36 -0000 2.36
+++ Menu.pm 6 Dec 2003 13:49:42 -0000 2.37
@@ -1,6 +1,6 @@
# Vend::Menu - Interchange menu processing routines
#
-# $Id: Menu.pm,v 2.36 2003/11/23 16:42:36 mheins Exp $
+# $Id: Menu.pm,v 2.37 2003/12/06 13:49:42 mheins Exp $
#
# Copyright (C) 2002 Mike Heins, <mike at perusion.net>
#
@@ -21,7 +21,7 @@
package Vend::Menu;
-$VERSION = substr(q$Revision: 2.36 $, 10);
+$VERSION = substr(q$Revision: 2.37 $, 10);
use Vend::Util;
use strict;
@@ -474,6 +474,10 @@
Vend::Tags->loop(undef,$opt,'');
reset_transforms();
my $list = $opt->{object}{mv_results};
+ if(@$list and my $fn = $opt->{object}{mv_field_names}) {
+ push @$fn, 'mv_last_row';
+ $list->[-1][$#$fn] = 1;
+ }
$main = '';
for(@$list) {
$main .= menu_link($template, $_, $opt);
@@ -585,6 +589,8 @@
$rows = \@o;
}
+ $rows->[-1]{mv_last_row} = 1 if @$rows;
+
# Prevent possibility of memory leak, reset last_line/first_line
reset_transforms();
@@ -925,6 +931,8 @@
}
$rows = \@o;
}
+
+ $rows->[-1]{mv_last_row} = 1 if @$rows;
my $openvar = $opt->{open_variable} || 'open';
More information about the interchange-cvs
mailing list