Galen, Thanks; that helps a lot. Galen and/or Erik, Since you mentioned that the SIP2 interface would be the logical way to interact with the circulation system, I took a look at it. It looks easy enough to configure, using the Koha Manual as a guide: http://koha.org/documentation/manual/3.2/appendices/sip2-integration. However, I don't have the foggiest idea how the interface could be used once it's configured. The testing example on this page might as well be Greek for someone who doesn't know SIP and testing wouldn't get me any closer to getting Aeon to use Koha's SIP interface anyway. I'm going to see if any of Aeon's developers are fluent in SIP; in case I have to set this up myself, can you recommend a good source of documentation for using SIP2 with Koha? Cheers, Christopher Curry Assistant Technical Librarian / Assistant IT Officer American Philosophical Society 105 South Fifth Street Philadelphia, PA 19106-3386 Tel. (215) 599-4299 ccurry@amphilsoc.org <mailto:ccurry@amphilsoc.org> Galen Charlton wrote:
Hi,
On Fri, Feb 19, 2010 at 4:48 PM, Christopher Curry <ccurry@amphilsoc.org> wrote:
Just to verify, I can call the itemnumber variable with:
<!-- TMPL_VAR NAME="itemnumber" -->
right?
Correct, although only in the TMPL_LOOP that goes through the item data.
It seems like these variables usually use the MySQL field name, which is very logical. Is that a good rule of thumb to follow when determining if a variable is available to a template?
It's a reasonably good rule of thumb, but not a perfect one.
Any idea where these variables are defined? I have fundamental programming knowledge, but don't know much about perl. Thanks for answering the novice questions.
Koha uses HTML::Template::Pro for its templating. Basically, an HTML::Template::Pro object is created that binds itself to a particular template, and variables are passed to the template via the param() method. get_template_and_user() in C4::Auth is a wrapper that, among other things, creates the template object, which is normally referred to as $template in the Perl scripts.
In the simplest case, to pass a scalar value to the template, you would do something like this:
$template->param(bar => 'value');
In the template, that value would be retrieved using
<!-- TMPL_VAR NAME="bar" -->
You can also pass more complicated data structures. For example:
$template->param( myloop => [ { value => 'abc' }, { value => 'def' }, ], );
which can be retrieved via
<!-- TMPL_LOOP NAME="myloop" --> <!-- TMPL_VAR NAME="value" --> <!-- /TMPL_LOOP -->
which would emit
abc def
Regards,
Galen