Difference between revisions of "Pagerange field"
m (→Description) |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
*** [[Pagerange field]] | *** [[Pagerange field]] | ||
− | == Properties == | + | == Additional Properties == |
− | + | As for [[Int field#Additional_Properties|Int fields]]. | |
== Required Phrases == | == Required Phrases == | ||
− | No additional phrases. | + | No additional phrases beyond those required for [[Int field#Required_Phrases|Int fields]]. |
== Database == | == Database == | ||
Line 22: | Line 22: | ||
fieldname VARCHAR(255) | fieldname VARCHAR(255) | ||
− | == API | + | == API == |
− | See [[API:EPrints/MetaField/ | + | See [[API:EPrints/MetaField/Pagerange|API page]]. |
== Examples == | == Examples == |
Latest revision as of 22:52, 9 April 2023
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Metadata Fields: Arclanguage - Base64 - Bigint - Boolean - Compound - Counter - Dataobjref - Date - Decimal - Email - Fields - Float - Id - Idci - Image - Int - Itemref - Keywords - Langid - Longtext - Longtext_counter - Multilang - Multipart - Name - Namedset - Pagerange - Recaptcha - Recaptcha3 - Relation - Search - Secret - Set - Storable - Subject - Subobject - Text - Time - Timestamp - Url - Uuid
Contents
Description
This field is stored as a single text string in the database but is presented as two text fields to fill in a from and a to. The text between the two fields is set using the lib/metafield:to
phrase.
When the two fields are saved to the database a - is added between the from and a to fields so 5 and 10 becomes 5-10. This would then be rendered in a citation using lib/metafield/pagerange:range
, by default pp. 5-10. If only the from field is entered or is the same as the to field then the citation would be rendered using lib/metafield/pagerange:from_page
or lib/metafield/pagerange:same_page
respectively. By default: p. 5, if from field is 5.
Inheritance
Additional Properties
As for Int fields.
Required Phrases
No additional phrases beyond those required for Int fields.
Database
Pagerange fields are stored in the database as
fieldname VARCHAR(255)
API
See API page.
Examples
Most basic example.
{ name => 'pagerange', type => 'pagerange', }