[Koha-devel] Hardcoding XSLT files to force opening URLs in new window (bug #3098)
Wagner, Jane
jwagner at ptfs.com
Fri Jul 24 18:22:54 CEST 2009
If XSLT is turned on (for OPAC details and results), the syspref
OPACURLOpenInNewWindow is not obeyed. For sites who want URLs to open
in a new window, this is a problem ranging from mildly annoying to a
serious concern. I reported it as a bug (#3098) some time ago, and
revisited it again today for one of my sites.
I have not yet been able to figure out how to pass the syspref into the
XSLT files, but I have been able to hardcode those files to force
opening a new window instead of the default same window. Following
discussion on the IRC today, I'm not going to send this as a patch, but
I thought I'd share it for other sites who want URLs to open in a new
window and want an interim local fix until the larger problem of
passing/obeying sysprefs is solved.
Under koha-tmpl/opac-tmpl/prog/en/xslt, in MARC21slim2OPACDetail.xsl and
MARC21slim2OPACResults.xsl, under the 856 section, search for the line
<a><xsl:attribute name="href"><xsl:value-of
select="marc:subfield[@code='u']"/></xsl:attribute>
Change the beginning <a> as follows:
<a target="_blank">
Jane Wagner
Library Systems Analyst
PTFS Inc.
Content Management and Library Solutions
6400 Goldsboro Road, Suite 200
Bethesda, MD 20817
(301) 654-8088 x 151
jwagner at ptfs.com
More information about the Koha-devel
mailing list