A couple of questions, now that I look at your message more closely. I copied the syntax from opac-detail.pl and .tmpl, because that was the only screen where it worked. I didn't think to check Auth.pm -- does that mean the existing param code block is superfluous to the opac-detail.pl script?
When I added the TMPL_VAR statements into the various .tmpl files, I definitely added a closing TMPL_IF statement for each one. I'm positive of that because I was doing them in pairs. The second one may not be visible in the patch file because the existing /TMPL_IFs were a little further down. Does this mean that those files might have existing problems with missing /TMPL_IFs? I'll go in and rework them tomorrow, but I'm not sure about the /TMPL_IF problem. Jane Wagner Library Systems Analyst PTFS Inc. Content Management and Library Solutions 6400 Goldsboro Road, Suite 200 Bethesda, MD 20817 (301) 654-8088 x 151 [email protected] -----Original Message----- From: Galen Charlton [mailto:[email protected]] Sent: Wed 4/29/2009 4:05 PM To: Wagner, Jane Cc: [email protected] Subject: Re: [Koha-patches] [PATCH] Bug 3173 Place Hold link visible in OPAC even if syspref turned off Hi Jane, This needs work - please see below: On Wed, Apr 29, 2009 at 3:30 PM, Jane Wagner <[email protected]> wrote: > diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl > b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl > index a102457..5897f86 100644 > --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl > +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl > @@ -76,9 +76,10 @@ function tagAdded() { > ); > return false; > }); > + <!-- TMPL_IF NAME="opacuserlogin" --><!-- TMPL_IF > NAME="RequestOnOpac" --> > $(".holdsep").text("| "); > $(".hold").text("Place Hold"); > - > + <!-- /TMPL_IF --> This change and the others like it in the other templates adds two TMPL_IFs but only one closing /TMPL_IF - this is a guaranteed template error. > index 154d8af..29ec6a9 100755 > --- a/opac/opac-basket.pl > +++ b/opac/opac-basket.pl > @@ -54,8 +54,11 @@ if (C4::Context->preference('TagsEnabled')) { > C4::Context->preference($_) and $template->param($_ => 1); > } > } > - > - > +# adding the $RequestOnOpac param > +my $RequestOnOpac; > +if (C4::Context->preference("RequestOnOpac")) { > + $RequestOnOpac = 1; > +} > foreach my $biblionumber ( @bibs ) { > $template->param( biblionumber => $biblionumber ); This change and the other ones like it are in the odd situation of being unnecessary but also not doing what you intended. It's not necessary because the RequestOnOpac syspref is one of the ones that's automatically passed to $template for OPAC scripts (see line 343 of C4/Auth.pm), but it also doesn't do what you intended because it only sets a $RequestOnOpac variable without also calling $template->param() to actually expose it to the template. Regards, Galen -- Galen Charlton VP, Research & Development, LibLime [email protected] p: 1-888-564-2457 x709 skype: gmcharlt
_______________________________________________ Koha-patches mailing list [email protected] http://lists.koha.org/mailman/listinfo/koha-patches
