Today, however, it's going to be some of the weird and wonderful ways you can bend Evergreen 2.2+'s printing system to your twisted will. There are 3 big user-facing features that people need to at least be aware of, in increasing levels of import: the new %INCLUDE()% macro, new receipt templates, and user-selectable contexts for receipt templates.
Here they are again, in decreasing order of import:
User-Selectable Contexts for Receipt Templates
So you've mastered printer context setup, eh? One machine can print to your desktop, receipt, and label printers effortlessly? Well it could, now you may have some work to do.
Well, hello there.
You can see from the screenshot that I've selected receipt for the (obviously?) receipt-oriented Checkout template. Selected? Receipt wasn't the default? No! This option is initially blank, so after upgrading Evergreen to 2.2 or later, libraries may have receipts printing who-knows-where. Not ideal. In a panic to get things working as expected, perhaps you changed the default printer context to use your receipt printer, but by modifying the receipt templates directly you can correct this and receipts can use the receipt context as expected.
It occurs to me that after writing 100+ words about printer contexts that I've never actually written about them here, and don't currently know where to point anyone for more information about how to best make use of them. Rather than stretch this out with a lot of explanation, I'll just say that if things were working on Evergreen 2.1 or below and now that you've upgraded to 2.2 or above and people are freaking out about printers, just select each template, choose Receipt from the "Force Printer Context" drop down, click Save Locally, lather, rinse, repeat. You'll be much happier when you're finished.
With that said, being able to select a specific printer context for each receipt template really helps when paired with new receipt templates.
New Receipt Templates
In Evergreen 2.2 there are some receipt templates that are brand new: "holds_on_bib," "holds_for_patron," "holds_shelf," and "holds_pull_list" are some. There are others, but the only one that I know for certain is big-time fun is holds_pull_list. Much like it says on the tin, it's printed whenever you print a holds pull list for staff to pull items off the shelves to fill holds. Until Evergreen 2.2 it's been difficult to customize the layout of pull lists, but with this receipt template, and the previously mentioned context selector, you should be able to design exactly the pull list your staff wants, be it for 3 inch printers or 8.5 x 11 inch printers. There are still 3 print buttons on the pull list page (sigh); just plain "Print" uses this template.
Using %INCLUDE()% in Receipt Templates
Oh, man. Personally, this might be the most important printing-related change in Evergreen 2.2, but I'm trying to be realistic with regard to other people's expectations here. What this is is another difficult-to-discover text replacement placeholder, but it's one that takes arguments. If you don't know anything about programming or functions or whatever, don't worry, I just mean you can put different words between the parenthesis and get different results out of it. This is accomplished with Library Settings. For those unfamiliar, Library Settings are specified on the server and downloaded each time the client is logged in. To add one more (welcome) level of complexity, library settings can be defined at various (and multiple!) levels in your organizational unit hierarchy. I'll touch on that some more in a little bit.
There are 5 different text replacements defined by default for use with %INCLUDE()%: alert_text, notice_text, event_text, header_text, and footer_text. Their names are just that: names; you could use notice_text for all of your headers and footer_text for all of your events, but don't; that would be terrible.
As an example, to use header_text, I replaced most (not all!) of the text in many of my receipt template header section with this: %INCLUDE(header_text)%. What that means is "Find the value of the header_text library setting, and put it here instead." So my header_text value is set to all of the HTML and CSS code that was common to all of the patron-facing receipts that we use. To do that, go to the Admin Menu, Local Administration, and then Library Settings Editor. To make it (much!) easier to find what you're looking for, type receipt into the text box at the top of the list, and click Filter. You should be left with a list of only 6 or 7 items that all include "receipt" somewhere in the name or description. The settings are named "Content of X include" where X is one of the 5 names above. A word of warning: Settings aren't allowed to have multiple lines, so you have to edit your HTML/CSS into one long line before pasting it into your setting. That's painful, but not a show-stopper.
I wouldn't recommend putting everything in your header section into header_text, because no matter what template you are editing, %INCLUDE(header_text)% will always return the same thing, so it would't be good to have the word "checkout" in it, for instance. The best thing to put in the header_text option is only what is common to every receipt that you want to have the same header. (Staff-only receipts probably don't need the same fancy header that the public gets, for instance.)
Maybe this makes more sense with an example.
I've made some changes since I last mentioned my library's receipts, so things will look a little different if you've read that series.
Here's what the new checkout receipts look like:
There's a fair bit of HTML behind that, but because of %INCLUDE()%, the receipt template itself has actually gotten shorter:
You can also see that I've also stashed the alert_text, notice_text, and event_text includes in there just in case I have a good use for them later, such as putting upcoming events in a little table at the bottom of the receipts…
Then to complete the receipts, I have to just go to the Library Settings Editor, find the "Content of header_text include" and "Content of footer_text include" options and set them like so:
Keeping in mind, of course, that both of those have to be entered as single lines. Eugh. Changes don't take effect until the next time staff clients log in. So if changes are made to includes late in the day, the next morning when staff log in everything will be updated.
An aside for multi-branch libraries, or tiny consortia: Library settings are assigned to org units, and if the particular org unit your workstation is at doesn't have a setting defined, in most cases it will then see if the parent org unit defines that setting, and so on, until it hits the top level of the org unit tree and gives up. This means that things like headers and footers can be set for whole systems or the entire consortium by defining them "high enough" in the org tree. Things like events, notices, and alerts can then be defined as generally or as specifically as needed.
Finally, if you are in a position where you manage your own server, it's possible to add additional include types. To do that, go to the Admin menu -> Server Settings -> Organization Unit Setting Types. Then click New Org Setting Type and fill in the fields like so:
|label||Content of NEW_INCLUDE_NAME include|
|description||Text/HTML/Macros to be inserted into receipt templates in place of %INCLUDE(NEW_INCLUDE_NAME)%|
Instead of NEW_INCLUDE_NAME just enter whatever the new include should be: item_detail, library_branding, whatever your receipts demand. The name field is important; everything up to the NEW_INCLUDE_NAME must be exactly that, but the label and description can be whatever you like, these are just what the other settings look like.
Hopefully there is something here that is useful to someone, there are too many ways to customize the printed output of an Evergreen Library System for me to even mention them all. If you want to do something and don't know if it's possible, poke around; you might stumble on something good.