]> git.evergreen-ils.org Git - working/Evergreen.git/blob - 2.0/development/customize_opac.xml
Add file for 1.6 branch.
[working/Evergreen.git] / 2.0 / development / customize_opac.xml
1 <?xml version="1.0" encoding="utf-8"?>\r
2 <chapter xml:id="Customizing_OPAC" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="EN"\r
3     xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink">\r
4         <info>\r
5                 <title>Customizing the OPAC</title>\r
6         </info>\r
7         <para>While Evergreen is ready to go out of the box, libraries will want to customize Evergreen with their own color scheme, logos and layout. This chapter will explain how to \r
8         customize Evergreen to meet the needs of your users. For these task some knowledge of <systemitem>html</systemitem> and <systemitem>css</systemitem> is required. Many of these \r
9         instructions assume an installation of Evergreen using the default file locations.</para>\r
10         <note>\r
11                 <para>Be sure to save a backup copy of all files you edit in a location other than <filename class="directory">/openils/var/web/opac/</filename> as files here could be \r
12                 overwritten when you upgrade your copy of Evergreen.</para>\r
13         </note> \r
14         <section xml:id="ColorScheme">\r
15                 <title>Change the Color Scheme</title>\r
16                 <indexterm><primary>OPAC</primary><secondary>customizing</secondary><tertiary>changing the color scheme</tertiary></indexterm>\r
17                 <para>To change the color scheme of the default Evergreen skin, edit <filename>/openils/var/web/opac/theme/default/css/colors.css</filename>. From this one file you can \r
18                 change the 4 base color scheme as well as colors of specific elements.     \r
19                 </para>                                                  \r
20                 <para>You can also create alternate themes for your users.</para>     \r
21                 <procedure>\r
22                         <step>\r
23                                 <para>Copy the css folder and its contents from the example alternate theme <filename>/openils/var/web/opac/theme/reddish/</filename> \r
24                                 to a new folder <filename>/openils/var/web/opac/theme/<emphasis>[your new theme]</emphasis>/</filename>.</para>\r
25                         </step> \r
26                         <step>\r
27                                 <para>Edit <filename>/openils/var/web/opac/theme/<emphasis role="bold">[your new theme]</emphasis>/css/colors.css</filename> to use the colors you want.</para>\r
28                         </step>\r
29                         <step>\r
30                                 <para>Link to your new style sheet by adding the following to <filename>/openils/var/web/opac/skin/default/xml/common/css_common.xml</filename>.</para>\r
31 <programlisting language="xml">\r
32 &lt;link type='text/css'\r
33 rel="alternate stylesheet"  \r
34 title='&amp;opac.style.yourtheme;'  \r
35 href="&lt;!--#echo var='OILS_THEME_BASE'--&gt;/yourtheme/css/colors.css" \r
36 name='Default' csstype='color'/&gt;\r
37 </programlisting> \r
38                         </step> \r
39                         <step>\r
40                                 <para> Give your new theme a name users can select by adding the following to <filename>/openils/var/web/opac/locale/<emphasis role="bold">\r
41                                 [your locale]</emphasis>/opac.dtd</filename>.</para>\r
42                                 <screen>&lt;!ENTITY opac.style.yourtheme "YourTheme"&gt;</screen>       \r
43                         </step> \r
44                 </procedure>    \r
45         </section>\r
46         <section xml:id="customizing_opac_text">\r
47                 <title>customizing Opac Text and Labels</title>\r
48                 <indexterm><primary>OPAC</primary><secondary>customizing</secondary><tertiary>text and labels</tertiary></indexterm>\r
49                 <para>To change text and links used throughout the OPAC, edit the following files:</para>\r
50                 <itemizedlist>\r
51                         <listitem><filename>/openils/var/web/opac/locale/<emphasis role="bold">[your locale]</emphasis>/lang.dtd</filename></listitem>\r
52                         <listitem><filename>/openils/var/web/opac/locale/<emphasis role="bold">[your locale]</emphasis>/opac.dtd</filename></listitem>\r
53                 </itemizedlist>\r
54                 <tip>\r
55                         <para>A better way to customize OPAC text is to create custom dtd files for your lang and opac customizations and then add a include \r
56                         statement above the default dtd files.</para>\r
57                 <programlisting>\r
58                 &lt;!DOCTYPE html PUBLIC \r
59                 "-//W3C//DTD XHTML 1.0 Transitional//EN"\r
60                 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [\r
61                 &lt;!--#include virtual="/opac/locale/${locale}/custom_opac.dtd"--&gt;\r
62                 &lt;!--#include virtual="/opac/locale/${locale}/opac.dtd"--&gt;\r
63                 ]&gt;\r
64                 </programlisting>\r
65                         <para>position is important here. The first/top included dtd files will take precedence over the subsequent dtd includes.</para> \r
66                 </tip>\r
67                 <para>While it is possible to add text to the xml files itself, it is a good practice to use the DTD file to control the text and refer to the DTD elements in the xml/html code.</para>   \r
68                 <para>For example, the <filename>footer.xml</filename> file has this code to generate a copyright statement:</para>\r
69 <programlisting>\r
70 &lt;div id='copyright_text'&gt;\r
71 &lt;span&gt;&amp;footer.copyright;&lt;/span&gt;\r
72 </programlisting>\r
73                 <para>The included <filename>opac.dtd</filename> file in the en-US locale directory has this setting for &amp;footer.copyright text:</para>  \r
74                 <programlisting>&lt;!ENTITY footer.copyright "Copyright &#xA9; 2006-2010 Georgia Public Library Service, and others"&gt;</programlisting>\r
75         </section>\r
76         <section xml:id="Logo_Images">\r
77                 <title>Logo Images</title>\r
78                 <para>To change the logos used by default to your own logos, replace the following files with images of your own, appropriately sized. </para>\r
79                 <itemizedlist>\r
80                         <listitem>Large main logo:<filename>/openils/var/web/opac/images/main_logo.jpg</filename></listitem>\r
81                         <listitem>Small logo:<filename>/openils/var/web/opac/images/small_logo.jpg</filename></listitem>\r
82                 </itemizedlist>                          \r
83         </section>\r
84         <section xml:id="AddedContent">\r
85                 <title>Added Content</title>\r
86                 <indexterm><primary>OPAC</primary><secondary>added content</secondary></indexterm>\r
87                 <para>By default Evergreen includes customizable <quote>Added Content</quote> features to enhance the OPAC experience for your user. These features include Amazon book covers \r
88                 and Google books searching. These features can be turned off or customized.</para>\r
89                 <simplesect xml:id="bookcovers">\r
90                         <title>Book Covers</title>\r
91                         <para>The default install of Evergreen includes Amazon book covers. The settings for this are controlled by the &lt;added_content&gt; section of \r
92                         <filename>/openils/conf/opensrf.xml</filename>. Here are the key elements of this configuration:</para> \r
93                         <programlisting>&lt;module&gt;OpenILS::WWW::AddedContent::Amazon&lt;/module&gt;</programlisting>\r
94                         <para>This calls the Amazon perl module. If you wish to link to a different book cover service other than Amazon, you must create a new perl module and refer to it here. \r
95                         You will also need to change other settings accordingly. There are some available book cover perl modules available in  \r
96                         <ulink url="http://svn.open-ils.org/trac/ILS/browser/trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent">trunk</ulink></para>\r
97                         <programlisting>&lt;base_url&gt;http://images.amazon.com/images/P/&lt;/base_url&gt;</programlisting>\r
98                         <para>Base URL for Amazon added content fetching.  This URL may need to be shortened when new (read: non-image) content fetching \r
99                         capabilities are added.</para>   \r
100                         <programlisting>&lt;timeout&gt;1&lt;/timeout&gt;</programlisting>\r
101                         <para>Max number of seconds to wait for an added content request to return data.  Data not returned within the timeout is considered a failure.</para>   \r
102                         <programlisting>&lt;retry_timeout&gt;600&lt;/retry_timeout&gt;</programlisting>\r
103                         <para>After added content lookups have been disabled due to too many lookup failures, this is the amount of time to wait before we try again.</para>\r
104                         <programlisting>&lt;max_errors&gt;15&lt;/max_errors&gt;</programlisting>\r
105                         <para>Maximum number of consecutive lookup errors a given process can live before added content lookups are disabled for everyone.</para>       \r
106                         <programlisting>&lt;userid&gt;MY_USER_ID&lt;/userid&gt;</programlisting>\r
107                         <para>If a userid is required to access the added content.</para>\r
108                 </simplesect>\r
109                 <simplesect xml:id="googlebookslink">\r
110                         <title>Google Books Link</title>\r
111                         <indexterm><primary>OPAC</primary><secondary>added content</secondary><tertiary>Google Books</tertiary></indexterm>\r
112                         <para>The results page will display a <emphasis role="bold">Browse in Google Books Search</emphasis> link for items in the results page which have corresponding entries\r
113                          in <systemitem class="resource">Google Books</systemitem>. \r
114                         This will link to Google Books content including table of contents and complete versions of the work if it exists in Google Books. Items not in Google Books will not \r
115                         display a link. This feature can be turned off by changing the googleBooksLink variable setting to <emphasis>false</emphasis> in the file \r
116                         <filename>/openils/var/web/opac/skin/default/js/result_common.js</filename>. By default, this feature is activated. </para> \r
117                 </simplesect>\r
118                 <simplesect xml:id="addedcontent-syndetics">\r
119                         <title>Syndetics</title><indexterm><primary>added content</primary><secondary>Syndetics</secondary></indexterm>\r
120                         <para>Sydantics is another option for added content, Here is an example of using Sydantics as your added content provider:</para>\r
121                         \r
122 <programlisting>\r
123 <![CDATA[\r
124             <!-- We're using Syndetics -->\r
125             <module>OpenILS::WWW::AddedContent::Syndetic</module>\r
126             <base_url>http://syndetics.com/index.aspx</base_url>\r
127 \r
128             <!-- A userid is required to access the added content from Syndetic. -->\r
129             <userid>uneedsomethinghere</userid>\r
130 \r
131             <!--\r
132             Max number of seconds to wait for an added content request to\r
133             return data.  Data not returned within the timeout is considered\r
134             a failure\r
135             -->\r
136             <timeout>1</timeout>\r
137 \r
138             <!--\r
139             After added content lookups have been disabled due to too many\r
140             lookup failures, this is the amount of time to wait before\r
141             we try again\r
142             -->\r
143             <retry_timeout>600</retry_timeout>\r
144 \r
145             <!--\r
146             maximum number of consecutive lookup errors a given process can\r
147             have before added content lookups are disabled for everyone\r
148             -->\r
149             <max_errors>15</max_errors>\r
150 \r
151         </added_content>\r
152 ]]>\r
153 </programlisting>\r
154                         <note><para>Sydantics is a fee based service. For details, visit: <ulink url="http://www.bowker.com/syndetics/">http://www.bowker.com/syndetics/</ulink></para></note>  \r
155                 </simplesect>             \r
156         </section>\r
157         <section xml:id="resultspage">\r
158                 <title>Customizing the Results Page</title>\r
159                 <para>The results page is extremely customizable and allows some built in features to be activated with some simple edits or more advanced customizations can be done by more \r
160                 experienced web developers.</para>\r
161                 <para>There are several critical files to edit if you wish to  customize the results page:</para>\r
162                 <itemizedlist>\r
163                         <listitem><filename>/openils/var/web/opac/skin/default/js/result_common.js</filename> - This file controls the JavaScript for the top level elements on the results \r
164                         page and should only be edited by experienced web developers except for the <link linkend='googlebookslink'>Google books link setting</link> mentioned previously.</listitem>\r
165                         <listitem><filename>/openils/var/web/opac/skin/default/js/rresult.js</filename> - Has some good controls of results page settings at the top of this file but \r
166                         requires web development skills for editing this file.</listitem>\r
167                         <listitem><filename>/openils/var/web/opac/skin/default/xml/result/rresult_table.xml</filename> - This controls the layout of the items table on results page.</listitem>\r
168                 </itemizedlist>          \r
169         </section>\r
170         <section xml:id="deatailspage">\r
171                 <title>Customizing the Details Page</title>\r
172                 <indexterm><primary>OPAC</primary><secondary>customizing</secondary><tertiary>details page</tertiary></indexterm>\r
173                 <para>There are many options when customizing the details page in Evergreen. The default settings are effective for most libraries, but it is important to understand the full potential \r
174                 of Evergreen when displaying the details of items.</para>               \r
175                 <para>Some quick features can be turned on and off by changing variable values in the file <filename>/openils/var/web/opac/skin/default/js/rdedail.js</filename>. \r
176                 You will notice the section at the top of this file called <quote>Per-skin configuration settings</quote>. Changing setting in this section can control several features including \r
177                 limiting results to local only or showing copy location or displaying serial holdings. Form this section you can also enable refworks and set the Refworks host URL.</para>\r
178                 <para>Some copy level details settings can be turned on and off from <filename>/openils/var/web/opac/skin/default/js/copy_details.js</filename> including displaying certain fields \r
179                 such as due date in the OPAC.</para>\r
180                 <para>An important file is the <filename>/openils/var/web/opac/skin/default/xml/rdetail/rdetail_summary.xml</filename> file. This file allows you to control which field to display in \r
181                 the details summary of the record. The new <link linkend='BibTemplate'>BibTemplate</link> feature makes this file even more powerful by allowing you to display any marc fields \r
182                 with a variety of formatting options.</para>\r
183                 <para>The <filename>/openils/var/web/opac/skin/default/xml/rdetail/rdetail_copyinfo.xml</filename> file allows you to format the display of the copy information.</para>   \r
184         </section>              \r
185         <section xml:id="BibTemplate">\r
186                 <title>BibTemplate</title><indexterm><primary>BibTemplate</primary></indexterm>\r
187                 <para>BibTemplate is an Evergreen-custom Dojo module which can be used to retrieve and format XML  data served by the Evergreen <systemitem class="protocol">unAPI</systemitem> service.                        <systemitem class="protocol">unAPI</systemitem> is a protocol for requesting known objects in specific formats, and Evergreen uses this to supply data – bibliographic records, \r
188                 metarecords, monograph holdings information, Located URIs, and more to come – in many different formats from MARCXML to MODS to custom XML applications.</para>\r
189                 <indexterm><primary>unAPI</primary></indexterm> <indexterm><primary>MARCXML</primary></indexterm><indexterm><primary>MODS</primary></indexterm>\r
190                 <para>Managing the display of information from raw XML can be difficult, and the purpose of BibTemplate  is to make this simpler, as well as move the display closer to the \r
191                 client and away from the source data. This is good from a separation-of-responsibilities perspective, and also makes it easier to contain and control local customization.</para>\r
192                 <para>BibTemplate supports the following Evergreen meta data formats:</para>\r
193                 <itemizedlist>\r
194                         <listitem>MARCXML - datatype='marcxml-full' (default)</listitem>                                        \r
195                         <listitem>MODS 3.3: datatype='mods33'</listitem>\r
196                         <listitem>Dublin Core: datatype='rdf_dc'</listitem><indexterm><primary>Dublin Core</primary></indexterm>\r
197                         <listitem>FGDC: datatype='fgdc'</listitem><indexterm><primary>FGDC</primary></indexterm>\r
198                 </itemizedlist>                 \r
199                 <simplesect>\r
200                         <title>HTML API</title>\r
201                         <para>BibTemplate follows the Dojo convention of adding attributes to existing (X)HTML in order to progressively change its behavior. The 1.6.0 HTML API consists of a \r
202                         set of attributes that are added to existing OPAC markup, and fall into two classes:</para><indexterm><primary>Dojo toolkit</primary></indexterm>\r
203                         <itemizedlist>\r
204                                 <listitem> The slot marker – Elements that denote the location of bibliographic data to insert.</listitem>\r
205                                 <listitem>The slot formatter – Elements that specify how the named data should be formatted for display.</listitem>\r
206                         </itemizedlist>          \r
207                 </simplesect>\r
208                 <simplesect>\r
209                         <title>Slot Marker</title><indexterm><primary>slot marker</primary></indexterm>\r
210                         <para>A slot marker is any displayable HTML element that has a type attribute with a value starting with opac/slot-data. This element will become the container \r
211                         for the formatted data. A slot marker is required in order to retrieve, format and display data using BibTemplate. A slot marker must also have an \r
212                         attribute called query containing a CSS3 selector. This selector is applied to the XML returned by the unAPI service in order to gather the specific XML \r
213                         Nodes that should be considered for formatting.</para><indexterm><primary>CSS3</primary></indexterm>\r
214                         <para>The slot marker can also specify the format of the data to be returned from the unAPI service. This can be specified by adding +{format} to the type \r
215                         attribute, as in opac/slot-data+mods33-full. The default data format is marcxml-uri, which is an augmented MARCXML record containing Located URI information \r
216                         and unAPI links.</para>\r
217                         <para>Example of a slot marker:</para>\r
218                         <screen>&lt;p type='opac/slot-data' query='datafield[tag=245]'&gt;&lt;/p&gt;</screen>\r
219                         <para>Most useful attribute match operators include:</para>\r
220                         <itemizedlist>\r
221                                 <listitem> datafield[tag=245] - exact match</listitem>\r
222                                 <listitem>datafield[tag^=65] - match start of value</listitem>\r
223                         </itemizedlist> \r
224                         <tip><para>Selectors always narrow, so select broadly and iterate through the NodeList</para></tip>\r
225                 </simplesect>\r
226                 <simplesect>\r
227                         <title>Slot Formatter</title><indexterm><primary>slot formatter</primary></indexterm>\r
228                         <para>A slot formatter is any invisible HTML element which has a type attribute with the value of opac/slot-format. (NOTE: before 1.6.0.4, only &lt;script&gt; \r
229                         elements were supported, though this restriction is now removed to support Internet Explorer.) Only one slot formatter element is allowed in each slot. The text contents \r
230                         of this element are wrapped in a JavaScript<indexterm><primary>JavaScript</primary></indexterm> function and run for each node returned by the query CSS3 selector \r
231                         specified on the slot marker. This function is passed \r
232                         one argument, called item, which an XML Node captured by the selector. This function should return HTML text. The output for all runs of the slot formatter is \r
233                         concatenated into a single string and used to replace the contents of the slot marker.</para>\r
234                         <para>The slot formatter is optional, and if not supplied BibTemplate will create a simple function which extracts and returns the text content of the XML Nodes \r
235                         specified in the CSS3 selector.</para>\r
236                         <para>Example of a slot formatter:</para>\r
237 <programlisting>\r
238         &lt;td class='rdetail_item' id='rdetail_online' type='opac/slot-data' \r
239         query='volumes volume uris uri' join=", "&gt;\r
240                 &lt;script type='opac/slot-format'&gt;&lt;![CDATA[\r
241                         var link = '&lt;a href="' + item.getAttribute('href') + '"&gt;' + item.getAttribute('label') + '&lt;/a&gt;';\r
242                         if (item.getAttribute('use_restriction'))\r
243                                 link += ' (Use restriction: ' + item.getAttribute('use_restriction') + ')';\r
244                                 return link;\r
245                 ]]&gt;&lt;/script&gt;\r
246         &lt;/td&gt;\r
247 </programlisting>\r
248                 </simplesect>\r
249                 <simplesect>\r
250                         <title>JavaScript API</title><indexterm><primary>JavaScript</primary></indexterm>\r
251                         <para>In order for BibTemplate to find the slot markers and invoke the slot formatters JavaScript renderer must be instantiated and called. This must be done \r
252                         for each record that is to contribute to a pages display. The API for this is simple and straight-forward:</para>\r
253                         <para>The slot formatter is optional, and if not supplied BibTemplate will create a simple function which extracts and returns the text content of the XML Nodes \r
254                         specified in the CSS3 selector.</para><indexterm><primary>CSS3</primary></indexterm>\r
255                         <para>Example of a slot formatter:</para>\r
256 <programlisting>\r
257         dojo.require('openils.BibTemplate'); // Tell Dojo to load BibTemplate, if it is not already loaded\r
258         \r
259         // Create a renderer supplying the record id and the short name of the org unit, if known, \r
260         // and call the render() method                                         \r
261         new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render(); \r
262 </programlisting>\r
263                         <para>The argument hash supplied to the new <systemitem>openils.BibTemplate()</systemitem> constructor can have the following properties:</para>\r
264                         <itemizedlist>\r
265                                 <listitem>record – The bibliographic record ID.</listitem>\r
266                                 <listitem>org_unit – The relevant Organizational Unit, used to restrict holdings scope as on a search result or record detail page.</listitem>\r
267                                 <listitem>root – The root element within the web page that BibTemplate should search for slot markers</listitem>\r
268                         </itemizedlist>          \r
269                 </simplesect>\r
270                 <simplesect>\r
271                         <title>BibTemplate Examples</title>\r
272                         <para>This is all that we had to add to display the contents of an arbitrary MARC field:</para>\r
273 <programlisting>\r
274 &lt;tr&gt;\r
275         &lt;td&gt;Bibliography note&lt;/td&gt;\r
276         &lt;td type='opac/slot-data' query='datafield[tag=504]'&gt;&lt;/td&gt;\r
277 &lt;/tr&gt;\r
278 </programlisting>\r
279                         <note><para>If multiple fields match, they are displayed on consecutive lines within the same left-hand cell.</para></note>\r
280                         <para>To display a specific MARC subfield, add that subfield to the query attribute.</para><indexterm><primary>MARC</primary></indexterm>\r
281                         <para>For example, subfield $a is the only user-oriented subfield in field 586 (Awards Note)</para>\r
282 <programlisting>\r
283 &lt;tr&gt;\r
284         &lt;td&gt;Awards note&lt;/td&gt;\r
285         &lt;td type='opac/slot-data' query='datafield[tag=586] subfield[code=a]'&gt;&lt;/td&gt;\r
286 &lt;/tr&gt;\r
287 </programlisting>\r
288                         <para>Hide empty rows by default, and display them only if they have content:</para>\r
289 <programlisting>\r
290         &lt;tr class='hide_me' id='tag504'&gt;\r
291                 &lt;td&gt;Bibliographic note&lt;/td&gt;\r
292                 &lt;td type='opac/slot-data' query='datafield[tag=504]'&gt;\r
293                         &lt;script type='opac/slot-format'&gt;&lt;![CDATA[\r
294                                 dojo.query('#tag504').removeClass('hide_me');\r
295                                 return '&lt;span&gt;' + dojox.data.dom.textContent(item) +\r
296                                 '&lt;/span&gt;&lt;br/&gt;';\r
297                         ]]&gt;&lt;/script&gt;\r
298                 &lt;/td&gt;&lt;/tr&gt;\r
299 </programlisting>\r
300                         <itemizedlist>\r
301                                 <listitem>&lt;![CDATA[ ... ]]&gt; tells Evergreen Web server to treat the contents as literal <quote>character data</quote> - \r
302                                 avoids hilarity of entity substitution</listitem>\r
303                                 <listitem>&lt;script type='opac/slot-format'&gt;...&lt;/script&gt;, contained within an <quote>opac/slot-data</quote> element, receives a variable named item \r
304                                 containing the results of the query (a NodeList)</listitem>     \r
305                         </itemizedlist> \r
306                         <para>Suppressing a subfield:</para>\r
307 <programlisting>\r
308 &lt;tr class='hide_me' id='tag700'&gt;\r
309         &lt;td>Additional authors&lt;/td&gt;\r
310         &lt;td type='opac/slot-data' query='datafield[tag=700]'&gt;\r
311                 &lt;script type='opac/slot-format'&gt;&lt;![CDATA[\r
312                         dojo.query('#tag700').removeClass('hide_me');\r
313                         var text = '';\r
314                         var list = dojo.query('subfield:not([code=4])', item);\r
315                         for (var i =0; i &lt; list.length; i++) {\r
316                                 text += dojox.data.dom.textContent(list[i]) + ' ';\r
317                         }\r
318                         return '&lt;span&gt;' + text + '&lt;/span&gt;&lt;br/&gt;';\r
319                 ]]&gt;&lt;/script>\r
320         &lt;/td&gt;&lt;/tr&gt;\r
321 </programlisting>\r
322                 </simplesect>\r
323         </section>\r
324         <section xml:id="customizingslimpac">\r
325                 <title>Customizing the Slimpac</title>\r
326                 <para>The Slimpac is the an alternative OPAC display for browsers or devices without JavaScript or which may have screen size limitations. There is both a simple and advanced search \r
327                 option for the Slimpac.</para> \r
328                 <para>The html files for customizing the Slimpac search display are located in the folder <filename class="directory">/openils/var/web/opac/extras/slimpac</filename>.</para>\r
329                 <para><filename>start.html</filename> is the basic search display and <filename>advanced.html</filename> is the display for the advanced search option.</para>  \r
330                 <para>By default, the Slimpac files include the same locale dtd as the regular OPAC (<filename>opac.dtd</filename>). However, the slimpac files do not use the same CSS files as the \r
331                 regular OPAC which means that if you change the OPAC color scheme, you must also edit the Slimpac files.</para>\r
332                 <simplesect>\r
333                         <title>Customizing the Slimpac Results Display</title>\r
334                         <para>Two files control the display results for the slimpac. Edit the XSL stylesheet (<filename>/openils/var/xsl/ATOM2XHTML.xsl</filename>) to edit the elements of the \r
335                         record as pulled from the XML output. \r
336                         You may also change the style of the page by editing the CSS stylesheet for the results display (<filename>/openils/var/web/opac/extras/os.css</filename>).</para> \r
337                 </simplesect>\r
338                 <simplesect>\r
339                         <title>Customizing the Slimpac Details/Holdings Display</title> \r
340                         <para>It is also possible to customize the details page when viewing specific items from the results list. To edit the holdings display which contains the details of the specific \r
341                         record linked from the results display, edit the CSS stylesheet for the holdings/details page \r
342                         (<filename>/openils/var/web/opac/extras/htmlcard.css</filename>). You may also control the content of the record by editing <filename>MARC21slim2HTMLCard.xsl</filename>. \r
343                         Holdings data may also be controlled by editing <filename>MARC21slim2HTMLCard-holdings.xsl</filename>.</para>     \r
344                 </simplesect>\r
345         </section>\r
346         <section xml:id="integratingsearchforms">\r
347                 <title>Integrating a Evergreen Search Form on a Web Page</title>\r
348                 <para>It is possible to embed a simple search form into an html page which will allow users to search for materials in your Evergreen catalog. Here is code which can be embedded \r
349                 anywhere in the body of your web page:</para> \r
350 <programlisting language="html"><![CDATA[\r
351 <form action="http://[domain name]/opac/[locale]/skin/default/xml/rresult.xml" method="get">\r
352 <div>\r
353         Quick Catalog Search:<br />\r
354         <input type="text" alt="Input Box for Catalog Search" maxlength="250" \r
355         size="20" id="t" name="t" value=""  />\r
356         <input type="hidden" id="rt" name="rt" value="keyword" />\r
357         <input type="hidden" id="tp" name="tp" value="keyword" />\r
358         <input type="hidden" id="l" name="l" value="2" />\r
359         <input type="hidden" id="d" name="d" value="" />\r
360         <input type="hidden" id="f" name="f" value="" />\r
361         <input type="submit" value="Search" class="form-submit"  />\r
362     </div>\r
363 </form>\r
364 ]]>\r
365 </programlisting>\r
366                 <para> Replace <emphasis>[domain name]</emphasis> with the domain name of your Evergreen server and replace <emphasis>[locale]</emphasis> with the desired locale of \r
367                 your Evergreen instance (e.g. en-US). This does a basic keyword search. Different types of searches and more advanced search forms can be developed.</para> \r
368         </section>\r
369 </chapter>\r
370 \r