Page tree

DuraSpace Confluence and JIRA will be offline for service upgrades on Sunday, 6/17 between 8pm - 11pm EDT

Skip to end of metadata
Go to start of metadata

This recipe has been tested in 1.5.1 and will probably work with later versions. It is safe to use since it doesn't change any existing functions.

This recipe explains how to add extra alphabet letters in "browse" pages (like "Browsing by Title" , "Browsing by Author")

The english alphabet list is created by a for loop in with this piece of code:

            // Create a clickable list of the alphabet
            List jumpList = jump.addList("jump-list", List.TYPE_SIMPLE, "alphabet");
            Map<String, String> zeroQuery = new HashMap<String, String>(queryParams);
            zeroQuery.put(BrowseParams.STARTS_WITH, "0");
            jumpList.addItemXref(super.generateURL(BROWSE_URL_BASE, zeroQuery), "0-9");
            for (char c = 'A'; c <= 'Z'; c++)
                Map<String, String> cQuery = new HashMap<String, String>(queryParams);
                cQuery.put(BrowseParams.STARTS_WITH, Character.toString(c));
                jumpList.addItemXref(super.generateURL(BROWSE_URL_BASE, cQuery), Character

In order to add an extra alphabet list (in this case, Greek alphabet) you need to create another list with the letters you want to browse.
You need one for loop and one List jumpList per alphabet, in this example I had to use two for Greek because of an extra letter (now defunct) in the middle of the Greek alphabet.

            List jumpList2 = jump.addList("jump-list2", List.TYPE_SIMPLE, "alphabet");
            for (char vv = 'Α'; vv <= 'Ρ'; vv++) {
                Map<String, String> vvQuery = new HashMap<String, String>(queryParams);
                vvQuery.put(BrowseParams.STARTS_WITH, Character.toString(vv));
                jumpList2.addItemXref(super.generateURL(BROWSE_URL_BASE, vvQuery), Character.toString(vv));
            for (char qq = 'Σ'; qq <= 'Ω'; qq++) {
                Map<String, String> qqQuery = new HashMap<String, String>(queryParams);
                qqQuery.put(BrowseParams.STARTS_WITH, Character.toString(qq));
                jumpList2.addItemXref(super.generateURL(BROWSE_URL_BASE, qqQuery), Character.toString(qq));

To add specific letters in an existing list (like the "0-9"), you need to add


after or before the for loop that creates the list.

After rebuilding, the new list may not display properly (depending on the chosen theme).
A css selector must be used to place and style the extra list.