====== Managing MARC Templates ====== **NOTE**: * **Most of this information is also in the official Evergreen documentation**: * http://docs.evergreen-ils.org/dev/_marc_templates.html By default, MARC templates live under **/openils/var/templates/marc** and the only file installed by default is **k_book.xml** To add additional templates, simply add them to this directory and make the necessary addition to **opensrf.xml** Look for the section containing this: /openils/var/templates/marc/k_book.xml By looking at k_book.xml you'll see the file structure needed for the template. However, the tricky part is managing the spacing for your fixed field data. One method is to locate an existing record in the database that already has the desired MARC structure, and use this for your template. SELECT marc from biblio.record_entry where tcn_value='ABC123'; marc ---------------------------------------------------- 01571cam a2200409 a4500 20090228144931.0 920728 000 0 9789042023703 Birken, Marcia Discovering patterns in mathematics and poetry ILL University of Oklahoma Libraries Copy/Paste this XML into a new file, clear out the data specific to this record, and clean up any unwanted tag data. For instance, all that's needed is and to open and close the data, the xmlns data is not needed, nor is the "marc:" namespace that may or may not exist in the tags. Most importantly, don't disturb the spacing of the which contains the fixed field information, as that was the primary purpose for using this method. New templates require a restart of the Perl services to be utilized, and they are cached by the client on startup, so you'll need to close and reopen the client to use them. Some consortia have shared their MARC templates: * Conifer: [[http://git.evergreen-ils.org/?p=contrib/Conifer.git;a=tree;f=Open-ILS/src/templates/marc;h=f23050ba36c5cc7c80f8973980b0e196d7fd8f95;hb=refs/heads/feature/marctemplates_2_7]] * MVLC: [[http://git.evergreen-ils.org/?p=working/Evergreen.git;a=tree;f=Open-ILS/src/templates/marc;h=b6956fd3ce542fc351e40ab0e937d8db799e14b7;hb=refs/heads/user/dyrcona/MVLC_MARC_templates]]