EPrints Technical Mailing List Archive
Message: #07713
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Open Acces URL
- To: <eprints-tech@ecs.soton.ac.uk>, Gilles Fournié <gilles.fournie@cirad.fr>
- Subject: Re: [EP-tech] Open Acces URL
- From: James Kerwin <jkerwin2101@gmail.com>
- Date: Tue, 19 Feb 2019 13:20:33 +0000
Hi Gilles,
That is brilliant thank you for this, all sorted now.
The shame of not knowing to try .as_string(). It's so obvious now!
Thanks,
James
On Tue, Feb 19, 2019 at 1:09 PM Gilles Fournié via Eprints-tech <eprints-tech@ecs.soton.ac.uk> wrote:
Hi,
Try <a href="" Access link</a>
We use this when we want to get the raw data from the fields...
Regards,
GF
Le 19/02/2019 à 13:59, James Kerwin via Eprints-tech a écrit :
> Hi All,
>
> I've been asked to make a small alteration on the EPrints Abstract pages.
>
> Currently if there is an item with only an OA link in the repository
> (with no files uploaded) it gives a warning. My task is to change this
> to display the OA link near to the top of the page. The field
> containing the link is "oa_url".
>
> Using summary_page.xml I get to:
>
> <epc:if test="length($docs) = 0 and oa_url.is_set()">
>
> <epc:phrase ref="page:nofulltextwithoa1" />
>
> <a href="" Access link</a>
>
> <epc:phrase ref="page:nofulltextwithoa2" />
>
> <br />
>
> <epc:debug expr="oa_url" />
>
> <br />
>
> <epc:print expr="oa_url" />
>
>
> The epc:print _expression_ at the bottom gave me the link fully
> rendered. What I would like to do is create a piece of text with the
> link in saying "Open Access Link". Unfortunately, {oa_url} evaluates to:
>
> <a href="" href="https://emea01.safelinks.protection.outlook.com/?url="" originalSrc="http://www.bbc.co.uk/" shash="y7IuGlXrfofYU57+tpmO1/vMvSTKpmHLhCmWzb2U4OeJYN7GhEAGD0MCbbLVf3XrLQYb6eLDe09zoBjnXNSLxQHtdbS+ByhEde4bjT7n0aRU75ytiBv1qJjWk4MITkyypgN/Fn3lh1SXoYiWcfWzPQgW/OpfVWOmMbe2D1k7doE=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url="">
> <https://emea01.safelinks.protection.outlook.com/?url="">>
> <https://emea01.safelinks.protection.outlook.com/?url="">
> <https://emea01.safelinks.protection.outlook.com/?url="">>>">Open
> Access link</a>
>
> and the debug gives me:
> <a href="" href="https://emea01.safelinks.protection.outlook.com/?url="" originalSrc="http://www.bbc.co.uk/" shash="y7IuGlXrfofYU57+tpmO1/vMvSTKpmHLhCmWzb2U4OeJYN7GhEAGD0MCbbLVf3XrLQYb6eLDe09zoBjnXNSLxQHtdbS+ByhEde4bjT7n0aRU75ytiBv1qJjWk4MITkyypgN/Fn3lh1SXoYiWcfWzPQgW/OpfVWOmMbe2D1k7doE=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url="">
> <https://emea01.safelinks.protection.outlook.com/?url="">>">https://emea01.safelinks.protection.outlook.com/?url="">
> <https://emea01.safelinks.protection.outlook.com/?url="">></a>
>
> I realise {}, debug and epc:print are essentially generating the same
> thing, I'm just trying to use them differently/incorrectly. Obviously
> I can't put a whole <a></a> as a href value.
>
> Is there a way I can access just the link within oa_url?
>
> The oa_url field is in my:
>
> $c->{summary_page_metadata} = [qw/
>
> but we want to make it incredibly obvious to users that the OA link is
> there.
>
> Thanks,
> James
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://emea01.safelinks.protection.outlook.com/?url="">
> *** EPrints community wiki: https://emea01.safelinks.protection.outlook.com/?url="">
> *** EPrints developers Forum: https://emea01.safelinks.protection.outlook.com/?url="">
*** 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/
- Follow-Ups:
- Re: [EP-tech] Open Acces URL
- From: James Kerwin <jkerwin2101@gmail.com>
- Re: [EP-tech] Open Acces URL
- References:
- [EP-tech] Open Acces URL
- From: James Kerwin <jkerwin2101@gmail.com>
- Re: [EP-tech] Open Acces URL
- From: Gilles Fournié <gilles.fournie@cirad.fr>
- Re: [EP-tech] Open Acces URL
- From: James Kerwin <jkerwin2101@gmail.com>
- [EP-tech] Open Acces URL
- Prev by Date: Re: [EP-tech] Open Acces URL
- Next by Date: Re: [EP-tech] REST problems with capital letters
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):