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

[EP-tech] Open Acces URL



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 at ecs.soton.ac.uk> wrote:

> Hi,
>
> Try <a href="{oa_url.as_string()}">Open 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="{oa_url}">Open 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="
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=HwMaAcvFr%2BOftDpfM8xFtJpfLhulsrxm7zKPEnzmQZk%3D&amp;reserved=0
> > <
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=HwMaAcvFr%2BOftDpfM8xFtJpfLhulsrxm7zKPEnzmQZk%3D&amp;reserved=0>
>
> > <
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=HwMaAcvFr%2BOftDpfM8xFtJpfLhulsrxm7zKPEnzmQZk%3D&amp;reserved=0
> > <
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=HwMaAcvFr%2BOftDpfM8xFtJpfLhulsrxm7zKPEnzmQZk%3D&amp;reserved=0>>">Open
>
> > Access link</a>
> >
> > and the debug gives me:
> > <a href="
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=HwMaAcvFr%2BOftDpfM8xFtJpfLhulsrxm7zKPEnzmQZk%3D&amp;reserved=0
> > <
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=HwMaAcvFr%2BOftDpfM8xFtJpfLhulsrxm7zKPEnzmQZk%3D&amp;reserved=0
> >">
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=HwMaAcvFr%2BOftDpfM8xFtJpfLhulsrxm7zKPEnzmQZk%3D&amp;reserved=0
> > <
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=HwMaAcvFr%2BOftDpfM8xFtJpfLhulsrxm7zKPEnzmQZk%3D&amp;reserved=0
> ></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=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=n9Y4yD9UFMEZKtyCbm7Jd7SfzhVEkI4d0jT%2BZ76igVc%3D&amp;reserved=0
> > *** EPrints community wiki:
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=DkywiDkPBf2zyLxsRuxXKztZ39D5hLRSe%2FeU%2FQ5MZxk%3D&amp;reserved=0
> > *** EPrints developers Forum:
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=LDuqAlHl1oVLd5wqlAvi%2FobEQCY4kbJAapxhRn%2B1C7w%3D&amp;reserved=0
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=n9Y4yD9UFMEZKtyCbm7Jd7SfzhVEkI4d0jT%2BZ76igVc%3D&amp;reserved=0
> *** EPrints community wiki: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=DkywiDkPBf2zyLxsRuxXKztZ39D5hLRSe%2FeU%2FQ5MZxk%3D&amp;reserved=0
> *** EPrints developers Forum: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8cf16a8948be4b4ddc1808d6966d0e95%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=LDuqAlHl1oVLd5wqlAvi%2FobEQCY4kbJAapxhRn%2B1C7w%3D&amp;reserved=0
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20190219/68bb154b/attachment-0001.html