[OPEN-ILS-GENERAL] add marc field in opac

Mike Rylander mrylander at gmail.com
Wed Feb 10 20:35:46 EST 2010


On Wed, Feb 10, 2010 at 5:39 PM, Soulliere, Robert
<robert.soulliere at mohawkcollege.ca> wrote:
> Levani,
>
> The best guidance for adding new fields is found on the Wiki here:
> http://www.open-ils.org/dokuwiki/doku.php?id=scratchpad:supercat_opac_example
>
> I was experimenting with this on our test server today. Here are some other very simple examples.
>
> Add Call Number (MARC tag 050):
> <tr>
>                <td nowrap='nowrap' class='rdetail_desc'>Call Number</td>
>                <td type='opac/slot-data+marcxml' query='datafield[tag=050] subfield'  class='rdetail_item'>
>                    <script type='opac/slot-format'>
>                     return dojox.data.dom.textContent(item);
>                    </script>
>                </td>
>            </tr>
>
>
> Add statement of responsibility (MARC tag 245 subfield c) - this is useful if you want to place statement of responsibility in a separate field from title.
>
> <tr>
>                <td nowrap='nowrap' class='rdetail_desc'>Statement of Responsibility</td>
>               <td type='opac/slot-data' query='datafield[tag=245] subfield[code=c]' class='rdetail_item'>
>                    <script type='opac/slot-format'>
>                    return dojox.data.dom.textContent(item);
>                    </script>
>                </td>
>            </tr>
>

It actually gets even simpler than this.  For the examples you show
here you don't even need the formatter element.  Just add:

<tr>
  <td nowrap='nowrap' class='rdetail_desc'>Statement of Responsibility</td>
  <td type='opac/slot-data' query='datafield[tag=245]
subfield[code=c]' class='rdetail_item'> </td>
</tr>
<tr>
  <td nowrap='nowrap' class='rdetail_desc'>Call Number</td>
  <td type='opac/slot-data' query='datafield[tag=050] > subfield'
class='rdetail_item'> </td>
</tr>

BibTemplate will supply a default formatter that simply inserts the
full text content of the nodes your query specifies.

UPDATE: I see that Dan gave an example that unhides a hidden version.
It's a style decision on how dynamic/consistent/inconsistent/whatever
you want the page you're drawing to be, IMO, but either way, it's easy
to do.  :)

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


>
> Regards,
> Robert
>
>
> ________________________________________
> From: open-ils-general-bounces at list.georgialibraries.org [open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Levani EL [levaniele at gmail.com]
> Sent: February 10, 2010 5:11 PM
> To: open-ils-general at list.georgialibraries.org
> Subject: [OPEN-ILS-GENERAL] add marc field in opac
>
> this is visible marc fields in opac how add new field?
>
> Title
> Author
> ISBN
> Edition
> Publication Date
> Publisher
> Physical Description
> Format
> Abstract
> Online Resources
>
>
>
> This E-mail contains privileged and confidential information intended
> only for the individual or entity named in the message.  If the reader
> of this message is not the intended recipient, or the agent responsible
> to deliver it to the intended recipient, you are hereby notified that
> any review, dissemination, distribution or copying of this communication
> is prohibited.  If this communication was received in error, please
> notify the sender by reply E-mail immediately, and delete and destroy
> the original message.
>


More information about the Open-ils-general mailing list