View Single Post
Old 05-25-2022, 06:19 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,924
Karma: 7208979
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
If you have an {identifiers:select(id)} composite column, it displays the id contents and clicking on it in book details returns the output as a Calibre search.

Instead, is it possible via a template (or custom function) to replicate the behaviour of the default Ids column where it displays the id name and opens the identifier url in the browser?
Yes. You can mark the composite as "Contains HTML" then build the link you want in the composite.

Example for Google identifiers:
Code:
program:
	id = select($identifiers, 'google');
	if id then
		'<a href="https://books.google.co.uk/books?id=' & id & '&redir_esc=y' & '">Google:' & id & '</a>'
	fi
You must hard code the URL components into the template.
chaley is offline   Reply With Quote