Date: Thu, 28 Mar 2024 06:16:26 -0400 (EDT) Message-ID: <761603279.27390.1711620986915@lyrasis1-roc-mp1> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_27389_910990402.1711620986915" ------=_Part_27389_910990402.1711620986915 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This recipe has been tested in 1.5.1 and will probably w= ork with later versions. It is safe to use since it doesn't change any exis= ting 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 Confi= gurableBrowse.java with this piece of code:
= // Create a clickable list of the alphabet List jumpList =3D jump.addList("jump-list", List.TYPE_SIMPLE, "= alphabet"); =20 Map<String, String> zeroQuery =3D new HashMap<String, = String>(queryParams); zeroQuery.put(BrowseParams.STARTS_WITH, "0"); jumpList.addItemXref(super.generateURL(BROWSE_URL_BASE, zeroQue= ry), "0-9"); =20 for (char c =3D 'A'; c <=3D 'Z'; c++) { Map<String, String> cQuery =3D new HashMap<String,= String>(queryParams); cQuery.put(BrowseParams.STARTS_WITH, Character.toString(c))= ; jumpList.addItemXref(super.generateURL(BROWSE_URL_BASE, cQu= ery), Character .toString(c)); }
In order to add an extra alphabet list (in this case, Greek alphabet) yo=
u 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 (no=
w defunct) in the middle of the Greek alphabet.
= List jumpList2 =3D jump.addList("jump-list2", List.TYPE_SIMPLE, "alpha= bet"); for (char vv =3D '=CE=91'; vv <=3D '=CE=A1'; vv++) { Map<String, String> vvQuery =3D new HashMap<String= , String>(queryParams); vvQuery.put(BrowseParams.STARTS_WITH, Character.toString(vv= )); jumpList2.addItemXref(super.generateURL(BROWSE_URL_BASE, vv= Query), Character.toString(vv)); } for (char qq =3D '=CE=A3'; qq <=3D '=CE=A9'; qq++) { Map<String, String> qqQuery =3D new HashMap<String= , String>(queryParams); qqQuery.put(BrowseParams.STARTS_WITH, Character.toString(qq= )); jumpList2.addItemXref(super.generateURL(BROWSE_URL_BASE, qq= Query), Character.toString(qq)); }
To add specific letters in an existing list (like the "0-9"), you need t= o add
= jumpList.addItemXref(...
after or before the for loop that creates the list.
After rebuilding, the new list may not display properly (depending on th=
e chosen theme).
A css selector must be used to place and style the extra list.