Putting collections search onto a third-party site

Platforms and Shebangs

The “Platform” in “The Museum Platform” means, of course, that TMP can do the whole shebang*, from back-end to user interface, with the hosting and supporting services all taken care of. But maybe you don’t need the whole shebang but only a tasty slice of it (if that’s a thing). Well, a platform is also something you can build on, right? It’s has always been our plan to make it easy to use TMP purely as the engine that museums can build into their existing websites, which are often great sites but struggle to do the collections part.

A client and a partner

It turned out that the Hunt Museum in Limerick were in something like this position, although in their case a great Dublin agency, New Graphic, were building them a brand new site. So we were very happy to be able to help them solve the collections part of the puzzle in their Explore section. It gave us the reason to build out TMP’s API and a WordPress plugin to consume it, but rather than us imagining the requirements we had a real use-case and development partner that could stretch it properly.

Just a quick aside about the Hunt Museum itself because, firstly, museums are more interesting than technology, and secondly it looks like such a fantastic place. It was established around a core collection from Gertrude and John Hunt that is rich in Irish history and prehistory, antiquities from around the world, and more recent decorative and fine arts. More recently it has come to hold two very special collections: an archive relating to the fashion designer Sybil Connolly, and a collection of contemporary Irish ceramics which is beautiful and fascinating and still growing.

AP I up

Anyway, back to the matter in hand: tech nerdery. To build TMP’s collections discovery features into other applications required an API that could handle both the data and the functionality built into our system. APIs come in myriad flavours but TMP itself uses WordPress, which is after all used by countless millions of other sites, and which countless more build upon using its own REST interface. Therefore the obvious choice was to extend that REST API to search collections and retrieve individual records, just like a TMP site does. But we also wanted our own application to take care of the common thorny and fiddly jobs that developers otherwise waste way too much of their time on and which nearly everyone needs; things like making links for pagination, filtering and in-set navigation, or processing raw data fields into something ready for display. So TMP’s REST API has now got a new “collections” route where you can request raw data (pretty much straight from the underlying ElasticSearch), processed fields, or both; and you with HTML in the response or not. All of which gives a developer lots of flexibility in terms of how they put a front-end together, because they can just drop chunks of HTML onto their page or do everything from the raw materials.

A plug in time…

The API can be used to integrate TMP into all sorts of client sites, whether into a CMS like Drupal or Wagtail or using a front-end framework like React. But the Hunt Museum is another WordPress site, so making a plugin to facilitate that was very much in our ambit. New Graphic could of course have worked directly with the API, but much better if we gave them a leg-up.

The idea with the plugin is that it handles all the connection settings and exposes the API to WordPress’s hook system. From that point, the easy thing to do is just tell it what pages you want to use to show searches and records on and which templates to employ (the provided example templates, or ones you have built). New Graphic’s design for both results and record pages departed greatly from TMP’s sample templates, which they used just as a starting point to made their own. And I think they look great.

A search showing some of the wonderful Sybil Connolly Collection at the Hunt Museum

The plugin also helps if you want to work with the API directly, and provides various utility functions to do your own thing when editing collection templates too. It’s still very early days and when we have other developers using these features I’m sure we’ll make improvements, but it’s been so satisfying to see the Hunt Museum collections site emerge with seemingly so little drama.

The Platform, shifted

We are now working with a couple of other clients who will be using the WordPress plugin too, or perhaps working directly with the TMP API, and it feels like it’s really opened up options where the vital collections element is missing from an otherwise capable site. With a new way of getting TMP collections into remote websites we had a rethink about what we offer, and to whom. We know that there are lots of skilled creative agencies out there who, like New Graphic, work with museums of all sizes but need a solution to the many and complex problems of making collections available online. If you’re such an agency, or such a museum, talk to us.

* no, I’ve no idea what one of these is ** but I’ve never met an incomplete one

** that’s not entirely true, but there does appear to be some confusion