Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [xpert] need help

Quote Reply
Re: [xpert] need help In reply to
Of course I have an idea.... try this global and call it on a template before <%loop links_loop%> (oh yes, this only works with loops):
Code:
sub {
my $tags = shift;
my $cp = ($tags->{title} =~ /^.*Page\s(\d*)/) ? $1 : 1;
my $ds = (($cp-1) * $CFG->{build_links_per_page}) + 1;
my $de = $CFG->{build_links_per_page} * $cp;
if ($tags->{total} < $de) {
$de = $tags->{total};
}
return { current_page => $cp,
display_start => $ds,
display_en => $ds };
}
In link.html, add somthing like near the top:
Code:
<%if display_start%>
<%set current_link_number = $display_start + $row_num - 1%>
<%endif%>
and where you want the number to appear, add
Code:
<%if current_link_number%><%current_link_number%><%endif%>
I haven't tested this (I use similar code, but it's all in a custom plugin, not in a global), but it should work.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Subject Author Views Date
Thread need help xpert 10080 Sep 28, 2002, 11:09 AM
Thread Re: [xpert] need help
yogi 9855 Sep 28, 2002, 10:28 PM
Thread Re: [yogi] need help
xpert 9894 Sep 29, 2002, 7:35 AM
Thread Re: [xpert] need help
xpert 9853 Sep 29, 2002, 7:45 PM
Thread Re: [xpert] need help
yogi 9805 Sep 30, 2002, 1:29 AM
Thread Re: [yogi] need help
xpert 9784 Sep 30, 2002, 6:21 AM
Thread Re: [xpert] need help
yogi 9836 Sep 30, 2002, 6:23 AM
Thread Re: [yogi] need help
xpert 9781 Sep 30, 2002, 6:25 AM
Thread Re: [xpert] need help
yogi 9831 Sep 30, 2002, 6:28 AM
Thread Re: [yogi] need help
xpert 9814 Sep 30, 2002, 6:37 AM
Thread Re: [xpert] need help
yogi 9808 Sep 30, 2002, 6:40 AM
Thread Re: [yogi] need help
xpert 9810 Sep 30, 2002, 3:09 PM
Thread Re: [xpert] need help
Paul 9764 Sep 30, 2002, 5:07 PM
Thread Re: [Paul] need help
xpert 9779 Oct 1, 2002, 3:11 PM
Thread Re: [xpert] need help
afinlr 9762 Oct 1, 2002, 4:15 PM
Thread Re: [afinlr] need help
xpert 9687 Oct 1, 2002, 4:50 PM
Thread Re: [xpert] need help
xpert 9693 Oct 2, 2002, 12:04 AM
Thread Re: [xpert] need help
yogi 9743 Oct 2, 2002, 12:16 AM
Thread Re: [yogi] need help
xpert 9753 Oct 2, 2002, 12:27 AM
Post Re: [xpert] need help
yogi 9710 Oct 2, 2002, 12:29 AM
Thread Re: [xpert] need help
afinlr 9733 Oct 2, 2002, 9:47 AM
Thread Re: [afinlr] need help
xpert 9682 Oct 2, 2002, 3:25 PM
Thread Re: [xpert] need help
afinlr 9726 Oct 2, 2002, 3:44 PM
Post Re: [afinlr] need help
xpert 9681 Oct 2, 2002, 5:19 PM