Sorting by two criteria in bibliography

Hi,
I would be really grateful for some help with my citation style. I work in a field (history) that necessitates having separate bibliographies for sources, literature and online sources. Now, I am aware that Zotero doesn't really do that on it's own, so I am looking to create a work around.

My plan was to have Zotero at least sort the titles in the bibliography in the correct order, so that I would only need to add in headings by hand in the end. For sorting i want to use two criteria:
1. Type of source (I use the "language" field for that, since it is available for all item types i use and I don't really need it for anything else). Each type of source gets a different letter in the "language" field: A for sources, B for literature, etc.
2. last name of the author (to keep the alphabetical order)

My hope was that titles in the bibliography would appear in order of their type (first all of the sources, then all of the literature, etc.) which works; but still sorted alphabetically by author within those types (which does not work). Could you have a look and tell me what I did wrong? Is this even possible?

Here's the citation style i use: https://pastebin.com/r8Ywf1aW
Sign In or Register to comment.