https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30657

--- Comment #24 from Martin Renvoize (ashimema) 
<martin.renvo...@ptfs-europe.com> ---
(In reply to Ray Delahunty from comment #23)
> (In reply to Martin Renvoize (ashimema) from comment #18)
> > We're really inconsistent in our notice variables unfortunately.. sometimes
> > it's borrower, sometimes it's patron 
> > 
> > [...] encourage end users to understand the relationships
> > between things to be able to lookup the information they need via object
> > traversal.
> 
> Am I off on a tangent here? This may be one of the reasons we librarians
> trying to use template toolkit to tidy up our notices struggle with TT. The
> table is borrowers in Koha but in template toolkit it is borrower. I'm
> gradually knowing what to use (not that I know why). Is there something like
> a schema for TT (probably a silly question), or can the TT variables
> (accessors??) gradually replace the alligator code on the left hand side of
> the notice design interface?

Unfortunately Ray it's not quite as simple as that :(.

There's lots of history here.. and some technical challenges too.

Notices are all generated by called to a method called 'GetPreparedLetter'..
that method is passed the template (which you define in your notices) and a
"bunch of variables" the template can use.  The challenge comes in identifying
which variables are likely to get passed into the call to GetPreparedLetter so
you can use them in your template.. it's a bit of a 'chicken and the egg'
problem.. before we call the method we can't know what's in there.. but we
can't call the method until we have a template to pass it.. but how does the
person building the template know what variables that can use to build their
template?

I've been wanting for a long time to work on cleaning up our notice generation
and write such a schema so the notice editor can definitely know what variables
it's getting passed for each notice type and you can therefore build notices
with more knowledge. (right now the <<>> helpers are a 'best guess' and often
get it wrong).

Back to this bug.. the aim here is to make extended patron attributes more
accessible for any notice that pass passed a patron object.. said patron
objects might be exposed with various variable names.. most often 'borrower'..
but I've also seen 'librarian', 'patron', 'user', 'author' etc etc in use... we
need that schema writing and maintaining in the future.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to