Skip to content

Commit

Permalink
Add support for [all-anchor] token in [more-list] template
Browse files Browse the repository at this point in the history
Example usage:

[flex-select
    more-list=|
        More rows:
        [all-anchor]View All[/all-anchor]
        [decade-next][/decade-next]
        [more]
        [decade-prev][/decade-prev]
    |
]
  • Loading branch information
jonjensen committed Apr 28, 2016
1 parent b9d1d14 commit 85f8e9e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/Vend/Interpolate.pm
@@ -1,8 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
# $Id: Interpolate.pm,v 2.313 2009-05-01 13:50:00 pajamian Exp $
#
# Copyright (C) 2002-2008 Interchange Development Group
# Copyright (C) 2002-2016 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
#
# This program was originally based on Vend 0.2 and 0.3
Expand All @@ -28,7 +26,7 @@ package Vend::Interpolate;
require Exporter;
@ISA = qw(Exporter);

$VERSION = substr(q$Revision: 2.313 $, 10);
$VERSION = '2.314';

@EXPORT = qw (
Expand Down Expand Up @@ -3486,6 +3484,12 @@ sub tag_more_list {
$hash{more_numeric} = join $more_joiner, @more_links;
}

if ($r =~ s:\[all[-_]anchor\]($All)\[/all[-_]anchor\]::i and ($first or $next)) {
my $all_anchor = $1;
$arg = "$session:0:0:100000";
push @more_links, more_link_template($all_anchor, $arg, $form_arg);
}

$hash{more_list} = join $more_joiner, @more_links;

$first = $first + 1;
Expand Down

0 comments on commit 85f8e9e

Please sign in to comment.