[EP-tech] Re: Summary page - available metadata

John Salter J.Salter at leeds.ac.uk
Fri Mar 14 11:06:12 GMT 2014


There's two main parts of the abstract page.
At the top, there is a citation for the item (containing the title, date, authors etc.), and below that on the page is a table of other bits of data.

For the first part, look at ...cfg/citations/eprints/summary.xml (mine includes <epc:print expr="$item.citation('default')" /> - which you should now understand to be ...cfg/citations/eprints/default.xml.
For the second part, look in  .../cfg/cfg.d/eprint_render.pl, at the $c->{summary_page_metadata}... 
You should generally be able to add the field name to this list and it will get included in the table of data.

I'm guessing you've discovered this, but just in case,
> ~/bin/generate_abstracts ARCHIVEID [eprintid]
 will regenerate the abstract for the eprintid specified (useful for testing a change before updating them all!)

Cheers,
john

-----Original Message-----
From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Andrew Beeken
Sent: 14 March 2014 10:50
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] Re: Summary page - available metadata

Okay, that’s working great - extrapolating out from this, how would I then
tap into other data? For example, we’d like to output a list of editors
onto the abstract page if the EPrint is a book. I know how to do the
conditional check for the type, I can see how to iterate through a number
of objects, but I’m not sure how to retrieve those objects. Once we have
them, I then presume that the theory is the same of using a citation
template with relative fields to extract data from the database.

On 14/03/2014 10:01, "John Salter" <J.Salter at leeds.ac.uk> wrote:

>If you're getting an EPScript error, take a look in the Apache error log
>- there may be something useful in there.
>This is the relevant wiki page: http://wiki.eprints.org/w/EPScript (maybe
>the 'Language Synopsis' section is the key to what you're doing wrong?)
>
>I'd recommend going down the route (as Tommy hinted at) of making a
>citation for the document (in
>..../cfg/citations/document/myLovelyCitation.xml) and using that e.g.
><epc:print expr="$doc.citation('default')" /> or <epc:print
>expr="$doc.citation(' myLovelyCitation')" />
>
>If none of that helps, show us what you've got and we may be able to help
>more!
>
>Cheers,
>John
>
>
>-----Original Message-----
>From: eprints-tech-bounces at ecs.soton.ac.uk
>[mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Andrew Beeken
>Sent: 14 March 2014 09:19
>To: eprints-tech at ecs.soton.ac.uk
>Subject: [EP-tech] Re: Summary page - available metadata
>
>Thanks Tommy,
>
>In principle I see how this should work, however all I¹m getting when I
>try to do anything here is an [error in script] output.
>
>For example, in <archive>/cfg/citations/eprint/summary_page.xml, the
>documents appear to be iterated through in a set (line 31) with the
>outputs handled as $doc.some_function(). This does not seem to correlate
>with being able to simply use database names in the output and when I try
>$doc.some_database_field() the error is generated. I¹ve also tried simply
>using the field as is but to no avail.
>
>
>
>On 13/03/2014 18:47, "Tommy Ingulfsen" <tommy at library.caltech.edu> wrote:
>
>>I assume you're using the EPrints Control Format (summary.xml)?
>>
>>If so, look at perl_lib/EPrints/Script.pm to see the various functions
>>you
>>can call on your object. For the metadata available for a document (as
>>opposed to an eprint) I would take a look at
>>archives/<archivename>/cfg/citations/document/*.xml. That should show
>>that
>>you can just use the field names from the 'document' database table like
>>so:
>>
>><epc:print expr="fieldname"/>
>>
>>Does that help at all?
>>
>>tommy
>>
>>On 3/12/14 5:37 AM, "Andrew Beeken" <anbeeken at lincoln.ac.uk> wrote:
>>
>>>Hello!
>>>
>>>Currently trying to make some alterations to our summary pages; is there
>>>any kind of documentation available as to what metadata can be used
>>>here,
>>>specifically (in this instance) for documents. For example, I want to be
>>>able to show the File Description and Title for a given document; I can
>>>see WHERE to do this, but not the variables within the document object
>>>to
>>>use.
>>>
>>>Andrew
>>>
>>>The University of Lincoln, located in the heart of the city of Lincoln,
>>>has established an international reputation based on high student
>>>satisfaction, excellent graduate employment and world-class research.
>>>
>>>The information in this e-mail and any attachments may be confidential.
>>>If you have received this email in error please notify the sender
>>>immediately and remove it from your system. Do not disclose the contents
>>>to another person or take copies.
>>>
>>>Email is not secure and may contain viruses. The University of Lincoln
>>>makes every effort to ensure email is sent without viruses, but cannot
>>>guarantee this and recommends recipients take appropriate precautions.
>>>
>>>The University may monitor email traffic data and content in accordance
>>>with its policies and English law. Further information can be found at:
>>>http://www.lincoln.ac.uk/legal.
>>>
>>>*** Options: 
>>>http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>>*** Archive: http://www.eprints.org/tech.php/
>>>*** EPrints community wiki: http://wiki.eprints.org/
>>>*** EPrints developers Forum: http://forum.eprints.org/
>>
>>
>>*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>*** Archive: http://www.eprints.org/tech.php/
>>*** EPrints community wiki: http://wiki.eprints.org/
>>*** EPrints developers Forum: http://forum.eprints.org/
>
>
>*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>*** Archive: http://www.eprints.org/tech.php/
>*** EPrints community wiki: http://wiki.eprints.org/
>*** EPrints developers Forum: http://forum.eprints.org/
>
>*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>*** Archive: http://www.eprints.org/tech.php/
>*** EPrints community wiki: http://wiki.eprints.org/
>*** EPrints developers Forum: http://forum.eprints.org/


*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/



More information about the Eprints-tech mailing list