I want the titles of every entry in my bibliography to have links to their respective urls if and only if some url is provided, while keeping urls out of sight. I have found this and this other similar questions, on whose answers I have based my approach. Unfortunately, I can't get the desired result. See the following MWE:
\documentclass{article}
\usepackage[url=false]{biblatex}
\usepackage[colorlinks]{hyperref}
\newbibmacro{string+doi}[1]{%
\iffieldundef{url}{#1}{\href{\thefield{url}}{#1}}}
\DeclareFieldFormat{title}{\usebibmacro{string+doi}{\mkbibemph{#1}}}
\DeclareFieldFormat[article]{title}{\usebibmacro{string+doi}{\mkbibquote{#1}}}
\begin{filecontents}{\jobname.bib}
@article{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
url = {http://tex.stackexchange.com/}
}
@book{B02,
author = {Buthor, B.},
year = {2002},
title = {Bravo},
url = {http://tex.stackexchange.com/},
}
@incollection{C03,
author = {Cuthor, C.},
year = {2003},
title = {Charlie},
url = {http://tex.stackexchange.com/},
}
@phdthesis{D04,
author = {Duthor, D.},
year = {2004},
title = {Delta},
url = {http://tex.stackexchange.com/},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\nocite{*}
\begin{document}
\printbibliography
\end{document}
As you can see in the schreenshot below, the problem is that the entry types other than @book @article do not get linkeable titles despite a url being provided. How can I get the desired effect bot only for the @book and @article classes but for @incollection, @phdthesis and @inbook classes too?
Thank you all!


