% my %links; my $linkid = 0; $t->{'ulink'}{testcode} = sub { my $node = shift; my $t = shift; my $url = findvalue('@url', $node); if (!exists $links{$url}) { $linkid++; $links{$url} = $linkid; } my $link_number = $links{$url}; $t->{pre} = ""; $t->{post} = " [$link_number]"; return 1; }; %>
<%= spacer(10,0) %> |
<%
# display title/TOC page
print apply_templates('/article/artheader/*');
%>
<% # display all pages foreach my $section (findnodes("/article/sect1")) { print apply_templates($section); } %> List of Links
"; } %> |