treebird/perl/navigation.pm
nekobit c18179b52b Navigation
FossilOrigin-Name: e1f2a5e64b2f8ba9ddb5c96d4d3ad8e37195d8f40020304df7f10ffb112a3c38
2022-08-10 05:06:47 +00:00

25 lines
509 B
Perl

package navigation;
use strict;
use warnings;
use Exporter 'import';
our @EXPORT = qw( generate_navigation );
use template_helpers 'to_template';
use l10n 'lang';
sub generate_navigation
{
my ($ssn, $data, $first_id, $last_id) = @_;
my %vars = (
prefix => '',
ssn => $ssn,
lang => \&lang,
start_id => $ssn->{post}->{start_id} || $first_id,
prev_id => $first_id,
next_id => $last_id,
);
to_template(\%vars, \$data->{'navigation.tt'});
}