[OPEN-ILS-DEV] Using opac_local.dtd

Duimovich, George George.Duimovich at NRCan-RNCan.gc.ca
Mon Mar 9 17:56:23 EDT 2009


>>The trick is to define opac_local.dtd before opac.dtd in the index.xml
>>file for your particular skin; 

That did it - I can now see the changes. 

Thanks,
George



-----Original Message-----
From: open-ils-dev-bounces at list.georgialibraries.org on behalf of Dan Scott
Sent: Mon 3/9/2009 5:40 PM
To: Evergreen Development Discussion List
Subject: Re: [OPEN-ILS-DEV] Using opac_local.dtd
 
Hi George:

2009/3/9 Duimovich, George <George.Duimovich at nrcan-rncan.gc.ca>:
> Hello,
>
> I would like to make some modifications to some of the default strings by
> using *_local.dtd files (eg. I created an "opac_local.dtd" file), mainly to
> trim some strings to save space as we compress the OPAC to fit our
> institutional common look & feel, plus some other local editing.
>
> However, I can't seem to make my sample change display display live in my
> local skin, but it does display live when I switch to the relevant language
> in the default skin.
>
> I am modifying/updating this file: ../opac/locale/fr-CA/opac_local.dtd by
> adding this new entity:
> <!ENTITY advanced.search.reset "Effacer">
>
> I have not made any changes to the files int the xml/advanced directory, so
> I can see that the relevant code is intact in our new skin:
>
> <button onclick='clearSearchBoxes();'>&advanced.search.reset;</button>
>
> Any pointers on what I may be doing wrong? All of my links in the new skin's
> xml directory have been re-pointed to the new directory location.
>
> We're trying to avoid modifications to the xml, but some mods will be
> necessary to support certain CSS work necessary to make the "big squeeze"
> into our look & feel.

My guess is that Warren might have taken the approach I have suggested
various times of defining a local DTD that over-rides specific entries
in the general DTD. I'm going to guess that you updated that local
DTD, but are looking at the default skin (or created a new skin since
then).

The trick is to define opac_local.dtd before opac.dtd in the index.xml
file for your particular skin; for example, you could create a new
skin by copying /openils/var/web/opac/skin/default to
/openils/var/web/opac/skin/nrcan, then add your opac_local.dtd to
override entity definitions to
/openils/var/web/opac/skin/nrcan/xml/index.xml like so:

...
<!DOCTYPE html PUBLIC
	"-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
	<!--#include virtual="/opac/locale/${locale}/opac_local.dtd"-->
	<!--#include virtual="/opac/locale/${locale}/opac.dtd"-->
]>
...

Should work, in theory.

-- 
Dan Scott
Laurentian University



More information about the Open-ils-dev mailing list