[Archivesspace_Users_Group] AS browse/search customizations?

Maderik, Rachel A. maderikra at vmi.edu
Tue Sep 30 13:36:01 EDT 2014

For your first point, we used a plugin to automatically add the desired sort type (A-Z in our case) if the browse URL doesn't already contain one, so http://archivesspace.vmi.edu/search?type=resource essentially redirects to http://archivesspace.vmi.edu/search?type=resource&sort=title_sort+asc.  It's a bit clunky, so I'd love to know if there's a cleaner way to change this in the templates themselves. The JS is below, if you want to try it out.

For your second point, are you talking about re-ordering the sections that appear (so "Subject" shows up before "Type"), or re-ordering the contents of each facet? If it's the latter, we used a plugin to sort them alphabetically instead of by number of items (https://github.com/maderikra/archivesspace-plugins/tree/master/sort_facets). If it's the former, that could also be accomplished with a jQuery plugin, but since ArchivesSpace has a habit of not using IDs in the HTML tags (which is something I would love to see and should be simple to implement), it could be tricky to identify individual sections.


function changesort1() {

        var curURL = document.location;
        var newURL = curURL + '&sort=title_sort+asc';
        window.location.replace (newURL);

function changesort2() {

        var curURL = document.location;
        var newURL = curURL + '?sort=title_sort+asc';
        window.location.replace (newURL);

//checks to make sure we're on a browse screen with no query terms and no existing sort
if ((( /search/.test(window.location.pathname)) && (/q=/.test(window.location.search) === false) && (/type=/.test(window.location.search)) && (/sort=/.test(window.location.search) === false)))

//checks to see if we're on a repository screen
if ((( /repositories\/[0-9]/.test(window.location.pathname)) && (/q=/.test(window.location.search) === false) && (/sort=/.test(window.location.search) === false)))

From: archivesspace_users_group-bounces at lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Galligan, Patrick
Sent: Tuesday, September 30, 2014 12:20 PM
To: Archivesspace Users Group
Subject: [Archivesspace_Users_Group] AS browse/search customizations?

In early September, Ben Goldman brought up that he'd like to be able to customize the browsing and searching options a little bit more, and a few of us agreed. However, it's been pretty quiet since then.

I'm looking to:

*         Change the default sort order on the browse page (Resources or Accessions automatically display in date descending order or identifier order)

*         Change the order of facets on the left side of the page

*         Hide the option for browsing classifications entirely

These should be possible, but I'm having trouble finding the files that control these options. Has anyone else had luck doing anything like this?


Patrick Galligan
Rockefeller Archive Center
Assistant Digital Archivist

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20140930/ba8ab307/attachment.html>

More information about the Archivesspace_Users_Group mailing list