This afternoon I pushed out a small change to the Library catalog that brings back the ability to see items that would be nearby on the shelf. Now, in both the keyword search results screen and the bibliographic records screens, call numbers are links. Clicking the call number link will bring you to an LC Call number browse screen for nearby items.
On the technical side, this ended up being easier in the end than I thought. I started by writing a script to build a URL for the call number browse, because Sierra was generating a call number search but only if we had a text (or image) link in the call number availability line using the ICON_NEARBY preference. But each time I tried to create a URL, I ended up with a browse location about 100 items away from where I should have been. I still don’t know why that is, and I can look at the URLs my script generated and they are identical to the URLs coming from Sierra, so there’s some other server-side shenanigans happening that I don’t know about.
After hitting my head against the wall with that for a while, I had Patrick pull up the Sierra documentation. (For some reason, I get server errors on all my computers and even my personal iPad when I try to go to CSDirect. Go figure.) The
ICON_NEARBY option, which controls the display on the browse nearby links, will automatically link the call numbers if you remove anything setting a textual link. This meant that all I had to do was change the setting in Sierra, and then update my jQuery scripts to pull the
.html() of the call number field instead of the
.text(). No ridiculous script building a call number link from scratch! Now we have call number browse back. (It’s still ugly, but one thing at a time.)
Let me know if you have any questions!