Short hyperlink text: URL alias

Most Zotero item types now include a URL field, and when a HTML bibliography is created with the item, the URL is wrapped by an HTML A tag so that it becomes a clickable hyperlink. All good.
But while journal editors may want to see the complete link in print, no matter how deep and full of query language, web designers would much prefer to have a simple, human-intelligible link text, not the entire URL. If I am linking my web bibliography to a particular digitalized page in Google Books or the Monumenta Germaniae Historica, it's enough for web-design purposes for me to show only the text "Google Books" or "MGH". My reader does not want to read the whole URL: they just want to use it. But I don't see any way to modify the Zotero CSL file to make this happen.
So here is my plea for a new feature: could we have an additional field, for example Website Title, available alongside every instance of the URL field in the various Zotero item types? Obviously this would be ignored when creating bibliographies in APA, MLA, etc styles. But it would supply a suitable alias for the hyperlink that would allow us to construct a decent web designer's bibliography CSL.
This new citation style could display full bibliographic data about the print original, but only a brief one or two-word hyperlink text that could be clicked to visit the digital mirror version.
Or can someone lead me through the steps to do this with Zotero in its present form?
  • What if you put the short name in Library Catalog? I don't think CSL can display the text of one field (Library Catalog) as a link with a URL from another field (URL), but you will have to do some post-processing anyway for your online bibliography, so the necessary transformation could be done server-side or in JavaScript.
  • Thanks ajlyon. I have experimented with misusing another field, but as you say, it does not suppress the ugly, over-long URL text in my layout. At present I have to rewrite the whole HTML file by hand afterwards, as here:
    http://www.piggin.net/stemmahist/biblioOLD.htm
    This problem was raised in discussion No. 1072 on this forum in March 2009, which prompted the inclusion of live URLs as a new feature in Zotero. It was pointed out then that the problem could not be solved via CSL but needed a hack. A further hack on the same principles would be very welcome if the clever Zotero team could look into this.
  • If it's on a live webpage, you can manipulated the Zotero-generated bibliography in JavaScript to get what you're looking for. Personally, I agree completely with you here. It would be great to be able to tell Zotero to link a certain field using the URL-- but that's not possible yet.
  • Conceptually you are right of course. It ought to possible to underlay any field with a hyperlink target. A user could choose to have an ISBN lead to a validator or an ISBN database, an author name to lead to a bibliographic directory of authors, a place of publication to lead to a thesaurus resolving placenames and so on. In that sense, my feature request is too narrow.
  • That said, the details of hyperlinking are outside the scope of CSL. This is the sort of thing that should be applied to generated bibliographies-- so I still think you should do this by post-processing the generated bibliographies. You may also want to look into the recently-announced server-side bibliography generation -- announcement on zotero-dev, API documentation.
Sign In or Register to comment.