|
From: | Paul POULAIN |
Subject: | Re: [Koha-devel] Template Development |
Date: | Mon, 03 Apr 2006 11:25:28 +0200 |
User-agent: | Mozilla Thunderbird 1.0.6-7.5.20060mdk (X11/20050322) |
Joshua Ferraro a écrit :
On Mon, Mar 20, 2006 at 12:57:48PM -0500, Kyle Hall wrote:Hey All, Is there any way to find out what branch an intranet browser is set to from any page? I tried using TMP_VAR NAME="branchname" but it is only accessible from circulation.tmpl.Looks like that variable is only made available to the circulation.tmpl. IIRC Owen was requesting something like this and I believe if you update CVS that variable is available to a few more scripts. Paul, isn't there some way we can make 'branchname' a global variable?
It is already. It's in uservenv. To get it, just add : $template->param(branchcode => C4::Context->userenv->{branch}); in Auth.pm somewhere around line 214 (sub get_template_and_user) -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org)
[Prev in Thread] | Current Thread | [Next in Thread] |