Hi Jonathan and Marcel: Thanks for your messages! I've realized my mistake...
1) When I was testing "opac-auth.detail.tt" and "opac-authorities.inc", my debugging strings weren't making it through, but I think that jstree was deleting them, which is why I didn't see them. I tried removing [% PROCESS 'opac-authorities.inc' %], and that quickly showed me that it was, in fact, working. 2) My mistake was that I was using [% INCLUDE 'external_file.inc' %], which doesn't work because it locally scopes all the variables. So the variable associated with the block will never be shared outside of the include file. However, if one uses the PROCESS directive, like in opac-auth.detail.tt, it works because it doesn't locally scope its variables, so they're accessible to the including file. It was just me not understanding the Template Toolkit instructions and the scoping of the blocks. Thanks again for having me look at this again : ). David Cook Systems Librarian Prosentient Systems 72/330 Wattle St, Ultimo, NSW 2007 > -----Original Message----- > From: [email protected] [mailto:koha-devel- > [email protected]] On Behalf Of Marcel de Rooy > Sent: Wednesday, 28 January 2015 11:03 PM > To: [email protected] > Subject: Re: [Koha-devel] Template Toolkit BLOCK in INCLUDE file > > I recall using it and testing it somewhere (...) in Koha and having it work fine > too.. > Mabye it is just little less obvious and a combination of things? > > > Could you please give (even) more detail? > > I think I don't understand what you are saying, I tested with a simple > > example and it seems to work: > > > However, I noticed that you can't access a BLOCK in an included file. > > I noticed some seemingly non-functional examples already in the Koha > codebase. > _______________________________________________ > Koha-devel mailing list > [email protected] > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : http://www.koha-community.org/ git : http://git.koha- > community.org/ bugs : http://bugs.koha-community.org/ _______________________________________________ Koha-devel mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
