Document fields

From EPrints Documentation
Revision as of 12:14, 27 January 2022 by (talk | contribs) (Added actually file name in bold.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects

Back to cfg.d contains the set_document_fields_automatic function. You use this function to perform a set of actions which you want to happen automatically before the Document as part of the Document commit() step, in which the document is written to the database.


$c->{set_document_automatic_fields} = sub
        my( $doc ) = @_;
        if($doc->value("description") eq ""){
                 $doc->value("description", "the default description"); #if the documents description is empty set it to a holding value