Difference between revisions of "Views.pl"

From EPrints Documentation
Jump to: navigation, search
(variations)
(variations)
Line 64: Line 64:
  
 
The following options are available:
 
The following options are available:
 +
  
 
* '''reverse'''
 
* '''reverse'''
  
 
Reverses the order in which the groupings are shown.  Default is the ordervalue for that field (usually alphanumeric).  Useful for dates as you may want the highest values first.
 
Reverses the order in which the groupings are shown.  Default is the ordervalue for that field (usually alphanumeric).  Useful for dates as you may want the highest values first.
 +
  
 
* '''filename'''
 
* '''filename'''
Line 74: Line 76:
  
 
  filename=different_filename
 
  filename=different_filename
 +
  
 
* '''first_value'''
 
* '''first_value'''
  
 
If a field is multiple, only use the first value.  Otherwise each item will appear once for each value.
 
If a field is multiple, only use the first value.  Otherwise each item will appear once for each value.
 +
  
 
* '''first_initial'''
 
* '''first_initial'''
Line 83: Line 87:
 
If using a name, truncate the given name to the first initial.  This will make items like "Les Carr" and "Leslie Carr" appear together.  Note it will also make "John Smith" and "Jake Smith" appear together too, showing that you really never can win.
 
If using a name, truncate the given name to the first initial.  This will make items like "Les Carr" and "Leslie Carr" appear together.  Note it will also make "John Smith" and "Jake Smith" appear together too, showing that you really never can win.
  
======first_letter======
+
 
 +
* '''first_letter'''
  
 
The same as 'truncate=1'
 
The same as 'truncate=1'
  
======truncate======
+
 
 +
* '''truncate'''
  
 
Use the first X characters of a value to group by.  truncate=4 may be useful for dates as it will group by the first four digits (the year) only.
 
Use the first X characters of a value to group by.  truncate=4 may be useful for dates as it will group by the first four digits (the year) only.
Line 93: Line 99:
 
  truncate=4
 
  truncate=4
  
======tags======
+
 
 +
* '''tags'''
  
 
Useful for fields like keywords where values may be separated by commas or semi-colons.  The value is split on these two characters ( , and ; ) and a heading is created for each.
 
Useful for fields like keywords where values may be separated by commas or semi-colons.  The value is split on these two characters ( , and ; ) and a heading is created for each.
  
======cloud======
+
 
 +
* '''cloud'''
  
 
Creates a tag cloud.  Sets jump to 'plain', cloudmax to 200, cloudmin to 80 and no_separator, then resizes the jump-to links according to frequency of use.
 
Creates a tag cloud.  Sets jump to 'plain', cloudmax to 200, cloudmin to 80 and no_separator, then resizes the jump-to links according to frequency of use.
  
======cloudmax======
+
 
 +
* '''cloudmax'''
  
 
The % size of the largest tag in a tag cloud.
 
The % size of the largest tag in a tag cloud.
  
======cloudmin======
+
 
 +
* '''cloudmin'''
  
 
The % size of the smallest tag in a tag cloud.
 
The % size of the smallest tag in a tag cloud.
  
======jump======
+
 
 +
* '''jump'''
  
 
   jump=plain
 
   jump=plain
Line 115: Line 126:
 
Turns of the 'jump to' text before the list of subheading navigation links.
 
Turns of the 'jump to' text before the list of subheading navigation links.
  
======no_seperator (sic)======
+
 
 +
* '''no_seperator (sic)'''
  
 
Turns of the separator between each subheading navigation link (by default '|').
 
Turns of the separator between each subheading navigation link (by default '|').
  
======string======
+
 
 +
* '''string'''
  
 
Uses values 'as is'.  No ordervalues, no phrases.
 
Uses values 'as is'.  No ordervalues, no phrases.

Revision as of 09:02, 3 July 2008

Option avaible for the views config

Basic

id (mandatory)

fields (mandatory)

order

Standard

allow_null

hideempty:

heading_level

include

subheadings

Extra feature

citation

nocount

nohtml

noindex

nolink

New features

new_column_at

This is an array of integers representing the number of items in a view list before another column is added. For example:

[ 10 ]

This would have one column of values until there were 11, then there would be 2 columns.

[ 10, 10 ]

This would have one column if there were ten or less values, two columns if there were between eleven and twenty (ten + ten) values, and three columns for all other cases.

[ 0, 0 ]

This would always have three columns.

Add one to the number of integers in the array and you get the maximum number of columns. The value of each integer defines the point at which that column becomes full, and more values cause an 'overflow' into the next column.

variations

This controls the various ways in which a browse view can be subheaded. It consists of a list of strings. Each string is the name of a non-compound metadata field (or the keyword DEFAULT, for an unsubheaded list), optionally followed by a semi-colon and a comma separated list of options. E.G:

variations => [
 "creators_name;first_letter",
 "type",
 "DEFAULT"
],

The following options are available:


  • reverse

Reverses the order in which the groupings are shown. Default is the ordervalue for that field (usually alphanumeric). Useful for dates as you may want the highest values first.


  • filename

Changes the filename of the view variation. The default is the name of the metadata field used, so if two variations use the same metadata field with different options, this is needed.

filename=different_filename


  • first_value

If a field is multiple, only use the first value. Otherwise each item will appear once for each value.


  • first_initial

If using a name, truncate the given name to the first initial. This will make items like "Les Carr" and "Leslie Carr" appear together. Note it will also make "John Smith" and "Jake Smith" appear together too, showing that you really never can win.


  • first_letter

The same as 'truncate=1'


  • truncate

Use the first X characters of a value to group by. truncate=4 may be useful for dates as it will group by the first four digits (the year) only.

truncate=4


  • tags

Useful for fields like keywords where values may be separated by commas or semi-colons. The value is split on these two characters ( , and ; ) and a heading is created for each.


  • cloud

Creates a tag cloud. Sets jump to 'plain', cloudmax to 200, cloudmin to 80 and no_separator, then resizes the jump-to links according to frequency of use.


  • cloudmax

The % size of the largest tag in a tag cloud.


  • cloudmin

The % size of the smallest tag in a tag cloud.


  • jump
 jump=plain

Turns of the 'jump to' text before the list of subheading navigation links.


  • no_seperator (sic)

Turns of the separator between each subheading navigation link (by default '|').


  • string

Uses values 'as is'. No ordervalues, no phrases.