Both sides previous revisionPrevious revisionNext revision | Previous revision |
development:howtos:supporting_a_new_export_format [2015/12/11 17:26] – ↷ Page moved from vufind2:supporting_a_new_export_format to development:howtos:supporting_a_new_export_format demiankatz | development:howtos:supporting_a_new_export_format [2023/12/12 14:37] (current) – demiankatz |
---|
====== Supporting a New Export Format ====== | ====== Supporting a New Export Format ====== |
| |
VuFind supports export both to a variety of file formats (MARC, MARC-XML, etc.) and third-party systems ([[http://endnote.com|EndNote]], [[https://www.refworks.com/|Refworks]], etc.). | VuFind® supports export both to a variety of file formats (MARC, MARC-XML, etc.) and third-party systems ([[http://endnote.com|EndNote]], [[https://www.refworks.com/|Refworks]], etc.). |
| |
It is relatively straightforward to add support for additional export formats. | It is relatively straightforward to add support for additional export formats. |
===== Step 1: Set Up export.ini ===== | ===== Step 1: Set Up export.ini ===== |
| |
VuFind contains an [[https://github.com/vufind-org/vufind/blob/master/config/vufind/export.ini|export.ini]] file which defines all available export formats. | VuFind® contains an [[https://github.com/vufind-org/vufind/blob/dev/config/vufind/export.ini|export.ini]] file which defines all available export formats. |
| |
Comments within this file explain all available settings for defining new export formats. Generally, you need to define which [[development:plugins:record_drivers|record driver]] methods must be callable to allow support by the format (requiredMethods[]), you set the HTTP headers necessary for the export output (headers[]), and if the data needs to be forwarded to an external system, you provide the target URL (redirectUrl). | Comments within this file explain all available settings for defining new export formats. Generally, you need to define which [[development:plugins:record_drivers|record driver]] methods must be callable to allow support by the format (requiredMethods[]), you set the HTTP headers necessary for the export output (headers[]), and if the data needs to be forwarded to an external system, you provide the target URL (redirectUrl). |
===== Step 2: Define Export Templates ===== | ===== Step 2: Define Export Templates ===== |
| |
VuFind needs a template file to build the export document. These can be customized on a record driver by record driver basis. However, since most exports are metadata and theme agnostic, it is usually best to define export templates in the AbstractBase record driver in the root theme. You can find all of the existing example templates [[https://github.com/vufind-org/vufind/tree/master/themes/root/templates/RecordDriver/AbstractBase|here]]. | VuFind® needs a template file to build the export document. These can be customized on a record driver by record driver basis. However, since most exports are metadata and theme agnostic, it is usually best to define export templates in the AbstractBase record driver in the root theme. You can find all of the existing example templates [[https://github.com/vufind-org/vufind/tree/dev/themes/root/templates/RecordDriver/AbstractBase|here]]. |
| |
Templates must be named export-{format}.phtml, where {format} is an all-lower-case name corresponding with a section of export.ini. | Templates must be named export-{format}.phtml, where {format} is an all-lower-case name corresponding with a section of export.ini. |
---- struct data ---- | ---- struct data ---- |
| properties.Page Owner : |
---- | ---- |
| |