[Koha] re-arrange facet order in Koha 20.11

Katrin Fischer katrin.fischer.83 at web.de
Tue Jun 22 10:09:26 NZST 2021


Hi Lucas,

thanks for sharing this - I didn't know you could do that! :)

Katrin

On 21.06.21 15:22, Lucas Gass wrote:
> Thomas,
>
> You can use CSS to rearrange and stabilize the order of the facets.
> You'll have to set CSS flex on the <ul> inside the facets and then you
> can use the order property to display each list element in the order
> you'd like. This example works for the staff client:
>
> #search-facets ul {
>     display: flex;
>     flex-direction: column;
> }
>
> #availability_facet {order: 1;} /*availabilty*/
> #ccode_id {order: 2;} /*Collections*/
> #holdingbranch_id {order: 3;} /*Holding libraries*/
> #itype_id {order: 4;} /*Item Types*/
> #se_id {order: 8;} /*Series*/
> #au_id {order: 7;} /*Authors*/
> #su-to_id {order: 6;} /*Topics*/
> #location_id {order: 5;} /*Locations*/
> #su-ut_id {order: 10;} /*Titles*/
> #su-geo_id {order: 9;} /*Paces*/
> #homebranch_id {order: 11;}
>
>
> Cheers,
>
>
> On Sun, Jun 20, 2021 at 10:37 AM Katrin Fischer
> <katrin.fischer.83 at web.de <mailto:katrin.fischer.83 at web.de>> wrote:
>
>     Hi Thomas,
>
>     as far as I know changing the sequence of facets is not possible
>     at the
>     moment.
>
>     For Elasticsearch you can choose which to display on the configuration
>     page and I noticed that you can reorder the facets with drag and
>     drop. I
>     was not able to test this, but you might want to give it a try.
>
>     For Zebra there are no configuration options like this, but it's quite
>     easy to hide some with CSS.
>
>     Renaming is not possible via configuration for either, but this is a
>     common task for some jQuery in OpacUserJs. I think you will find some
>     examples for "renaming" things in the jQuery library:
>
>     https://wiki.koha-community.org/wiki/JQuery_Library
>     <https://wiki.koha-community.org/wiki/JQuery_Library>
>
>     Hope this helps,
>
>     Katrin
>
>     On 18.06.21 10:48, Thomas Vealehse wrote:
>     > Hi
>     >
>     > I'd like to re-arrange the facet order on the results page in
>     the left hand
>     > side bar.
>     >
>     > For example 'Author' would be pushed down the list, and 'item
>     type' moved
>     > up.
>     >
>     > Also is it possible to rename the facets?
>     >
>     > Thanks
>     >
>     > Thomas
>     > _______________________________________________
>     >
>     > Koha mailing list http://koha-community.org
>     <http://koha-community.org>
>     > Koha at lists.katipo.co.nz <mailto:Koha at lists.katipo.co.nz>
>     > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>     <https://lists.katipo.co.nz/mailman/listinfo/koha>
>     _______________________________________________
>
>     Koha mailing list http://koha-community.org
>     <http://koha-community.org>
>     Koha at lists.katipo.co.nz <mailto:Koha at lists.katipo.co.nz>
>     Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>     <https://lists.katipo.co.nz/mailman/listinfo/koha>
>
>
>
> --
> Lucas Gass
> Web Developer
>


More information about the Koha mailing list