I would like to sort my bibliography alphabetically, but a list of citations in-text by year.
This question is about the same problem. However, the answer given relies on wrapping \printbibliography in a refcontext to change the sorting:
\begin{refcontext}[sorting=nyt]
\printbibliography
\end{refcontext}
I am writing a custom biblatex style for my university. I would like this behaviour to be the default, without the user of the style needing to change sorting within the document.
What do I need to include in the .bbx and/or .cbx files to achieve this?
Edit:
I can achieve this using:
\NewCommandCopy{\oldprintbibliography}{\printbibliography}
\renewcommand{\printbibliography}{
\begin{refcontext}[sorting=nyt]
\oldprintbibliography
\end{refcontext}
}
But this has the serious drawback that the user is then not able (without errors) to wrap \printbibliography in their own refcontext.

\renewcommand{\printbibliography}? – Heisenbugs Jun 15 '22 at 16:28\printbibliography, so I would want that to stay the same and not use some custom\printourunibib. So are you suggesting renewing this command? I just assumed there was some way to set the sorting, which is why I asked the question. – Heisenbugs Jun 15 '22 at 16:35\renewcommand{\printbibliography}could be a wrapper, yes. But sorting is attached to styles when not using ref contexts - are you using separatebibstyle/citestyleoptions? – Cicada Jun 15 '22 at 16:43style=unistyle. What do you mean by using separate bibstyle/citestyle? Do you mean like settingbibstyle=unistyle,citestyle=unistyle? – Heisenbugs Jun 15 '22 at 16:49