Difference between revisions of "Longtext field"

From EPrints Documentation
Jump to: navigation, search
m
(Added examples. Improved other sections unhide ToC.)
Line 1: Line 1:
 
{{fieldtypes}}
 
{{fieldtypes}}
__NOTOC__
+
 
 +
 
 +
== Description ==
 +
This fields store larger text fields (e.g. title abstracts, reference lists, etc.) that cannot be stored in a [[Text field]] that only allows a maximum of 255 characters.
 +
 
 
== Inheritance ==
 
== Inheritance ==
 
 
* [[:Category:EPrints_Metadata_Fields|Metadata field]]
 
* [[:Category:EPrints_Metadata_Fields|Metadata field]]
 
** [[Text field]]
 
** [[Text field]]
 
*** [[Longtext field]]
 
*** [[Longtext field]]
 
== Description ==
 
  
 
== Properties ==
 
== Properties ==
 
+
As for [[Text field]]s with the following differences...
As for [[text field]]s with the following differences...
 
  
 
{| border="1" cellpadding="3" cellspacing="0"
 
{| border="1" cellpadding="3" cellspacing="0"
Line 22: Line 22:
  
 
== Required Phrases ==
 
== Required Phrases ==
 +
No additional phrases.
 +
 +
== Database ==
 +
Longtext fields are stored in the database as
 +
 +
fieldname LONGTEXT
 +
 +
== API ==
 +
See [[API:EPrints/MetaField/Longtext|API page]].
 +
 +
== Examples ==
 +
Most basic example.
 +
{
 +
    name => 'task_purpose',
 +
    type => 'longtext',
 +
}
 +
Give more space, (so all text can be seen at once).
 +
{
 +
    name => 'referencetext',
 +
    type => 'longtext',
 +
    input_rows => 15,
 +
}
 +
Use a special rendering functions to display text in paragraphs.
 +
{
 +
  name => 'abstract',
 +
  type => 'longtext',
 +
  input_rows => 10,
 +
  render_single_value => 'render_paras',
 +
}
 +
Use special ordering for field for English (e.g. ignore indefinite and definite articles, etc.)
 +
{
 +
    name => 'title',
 +
    type => 'longtext',
 +
    input_rows => 3,
 +
    make_single_value_orderkey => 'EPrints::Extras::english_title_orderkey',
 +
}

Revision as of 11:40, 23 March 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


Description

This fields store larger text fields (e.g. title abstracts, reference lists, etc.) that cannot be stored in a Text field that only allows a maximum of 255 characters.

Inheritance

Properties

As for Text fields with the following differences...

name default description
input_rows n/a This property is taken from the repository configuration.
maxlength 65535 Can be overridden in the field definition.

Required Phrases

No additional phrases.

Database

Longtext fields are stored in the database as

fieldname LONGTEXT

API

See API page.

Examples

Most basic example.

{
    name => 'task_purpose',
    type => 'longtext',
}

Give more space, (so all text can be seen at once).

{
    name => 'referencetext',
    type => 'longtext',
    input_rows => 15,
}

Use a special rendering functions to display text in paragraphs.

{
  name => 'abstract',
  type => 'longtext',
  input_rows => 10,
  render_single_value => 'render_paras',
}

Use special ordering for field for English (e.g. ignore indefinite and definite articles, etc.)

{
    name => 'title',
    type => 'longtext',
    input_rows => 3,
    make_single_value_orderkey => 'EPrints::Extras::english_title_orderkey',
}