[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Abstract Metadata Rendering/EPC

Morning All,

In case anybody else faces the same challenge, I managed to do this
eventually. I'm not certain it's the best way, but it does work well so far.

 My task was to change the creators field in the EPrint metadata from:
[image: screen_before.png]

To (or something similar):
[image: screen_after.png]

I had a few false starts looking at altering (in my
cfg.d!) EPrints::Repository::render_name and
in EPrints::MetaField::Name::render_single_value as well as Compile.pm. I
took some inspiration from z_orcid_support.pl. I copied and altered this (
z_render_citation_name.pl) and then in summary_page.xml
(recollect_summary_page.xml in this case) called my new function:

Where I previously had:

<epc:print expr="$item.property($fieldname)" />

I now have:

<epc:if test="$fieldname != 'creators_name'">
    *<epc:print expr="$item.property($fieldname)" />*

<epc:if test="$fieldname = 'creators_name'">
*    <print expr="citation_namesmeta(creators, eprintid)" />*

In my new function I can pretty much alter the display to be anything I
like, which is helpful! I can't say if this is the ideal approach, but it
suits my needs.


On Tue, Mar 12, 2019 at 9:51 AM James Kerwin via Eprints-tech <
eprints-tech at ecs.soton.ac.uk> wrote:

> Hi All,
> I'm back on the "Hedonic Treadmill" of EPrints and need some advice.
> I can't work out how the metadata in an EPrint abstract is rendered, which
> I need to know in order to change how names of authors/creators are shown.
> At the moment they are listed side by side, separated by commas. There are
> too many commas and it's difficult to read.
> Could anybody point me in the right direction? I'm with it as far as:
> <epc:print expr="$item.property($fieldname)" />
> in my "summary_page.xml" file. The "name" field in question is a compound
> field called "creators" ("name" and "id") and in the summary_page_metadata
> config I've passed the name as "creators_name" so as to not display the
> related "id" on the abstract pages.
> I spent hours trying to work this out yesterday and didn't get far.
> Thanks,
> James
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cff9f709395bd449ea90d08d6a86b5592%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=uCOQaDZih2W7t2Z2UU%2B%2FjywR%2FQHFFDRzpus70YYCrDg%3D&amp;reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cff9f709395bd449ea90d08d6a86b5592%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=hHIT6tshxbkNBlYALLeOg7IwClfSCsYful5palOknSk%3D&amp;reserved=0
> *** EPrints developers Forum: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cff9f709395bd449ea90d08d6a86b5592%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=oz%2By7hSL3n5ShcZdodxv9EqW3CRdof%2BJdMjIo4w45Fs%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20190314/5291776a/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen_before.png
Type: image/png
Size: 5412 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20190314/5291776a/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen_after.png
Type: image/png
Size: 3456 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20190314/5291776a/attachment-0003.png