-my $authtypes = getauthtypes();
-my @authtypesloop = ();
-foreach my $thisauthtype ( keys %{$authtypes} ) {
- push @authtypesloop,
- { value => $thisauthtype,
- selected => $thisauthtype eq $authtypecode,
- authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
- };
-}
-$template->{VARS}->{'authtypesloop'} = \@authtypesloop;
-$template->{VARS}->{'authtypetext'} = $authtypes->{$authtypecode}{'authtypetext'};
-$template->{VARS}->{'authid'} = $authid;
-$template->{VARS}->{'count'} = $count;
+$template->param(
+ authority_types => $authority_types,
+ authtypetext => $authority_types->find($authtypecode)->authtypetext,
+ authid => $authid,
+ count => $count,
+ MARCURLS => $marcurlsarray,
+);