Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
development:howtos:supporting_a_new_citation_style [2023/03/27 19:03] – [Verify the record driver] sturkel | development:howtos:supporting_a_new_citation_style [2023/03/27 19:04] – [Set up template(s)] sturkel |
---|
Make sure the [[development:plugins:record_drivers|record drivers]] for records that can be cited in the new format return the name of the new citation format through their **getSupportedCitationFormats**() methods. Usually this can be accomplished by modifying [[https://github.com/vufind-org/vufind/blob/dev/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php|VuFind\RecordDriver\DefaultRecord]], which is the base class for most other record drivers. | Make sure the [[development:plugins:record_drivers|record drivers]] for records that can be cited in the new format return the name of the new citation format through their **getSupportedCitationFormats**() methods. Usually this can be accomplished by modifying [[https://github.com/vufind-org/vufind/blob/dev/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php|VuFind\RecordDriver\DefaultRecord]], which is the base class for most other record drivers. |
| |
====Configure the GetCitation Method==== | ====3. Configure the GetCitation Method==== |
Make sure the [[https://github.com/vufind-org/vufind/blob/dev/module/VuFind/src/VuFind/View/Helper/Root/Citation.php|VuFind\View\Helper\Root\Citation]] view helper contains a getCitation* method for your new format. The existing **getCitationMLA** and **getCitationAPA** methods show how existing citations are generated by collecting information from the record driver and rendering a template. | Make sure the [[https://github.com/vufind-org/vufind/blob/dev/module/VuFind/src/VuFind/View/Helper/Root/Citation.php|VuFind\View\Helper\Root\Citation]] view helper contains a getCitation* method for your new format. The existing **getCitationMLA** and **getCitationAPA** methods show how existing citations are generated by collecting information from the record driver and rendering a template. |
| |
====Set up template(s)==== | ====4. Set up template(s)==== |
Create necessary template(s) for the new citation format; existing templates can be found in the [[https://github.com/vufind-org/vufind/tree/dev/themes/root/templates/Citation|Citation folder of the root theme]]. | Create necessary template(s) for the new citation format; existing templates can be found in the [[https://github.com/vufind-org/vufind/tree/dev/themes/root/templates/Citation|Citation folder of the root theme]]. |
| |