<div dir="ltr">Hi Gilles,<div><br></div><div>That is brilliant thank you for this, all sorted now.</div><div><br></div><div>The shame of not knowing to try .as_string(). It&#39;s so obvious now!</div><div><br></div><div>Thanks,</div><div>James</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 19, 2019 at 1:09 PM Gilles Fournié via Eprints-tech &lt;<a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Try &lt;a href=&quot;{oa_url.as_string()}&quot;&gt;Open Access link&lt;/a&gt;<br>
<br>
We use this when we want to get the raw data from the fields...<br>
<br>
Regards,<br>
GF<br>
<br>
Le 19/02/2019 à 13:59, James Kerwin via Eprints-tech a écrit :<br>
&gt; Hi All,<br>
&gt;<br>
&gt; I&#39;ve been asked to make a small alteration on the EPrints Abstract pages.<br>
&gt;<br>
&gt; Currently if there is an item with only an OA link in the repository <br>
&gt; (with no files uploaded) it gives a warning. My task is to change this <br>
&gt; to display the OA link near to the top of the page. The field <br>
&gt; containing the link is &quot;oa_url&quot;.<br>
&gt;<br>
&gt; Using summary_page.xml I get to:<br>
&gt;<br>
&gt;                 &lt;epc:if test=&quot;length($docs) = 0 and oa_url.is_set()&quot;&gt;<br>
&gt;<br>
&gt;                       &lt;epc:phrase ref=&quot;page:nofulltextwithoa1&quot; /&gt;<br>
&gt;<br>
&gt;                 &lt;a href=&quot;{oa_url}&quot;&gt;Open Access link&lt;/a&gt;<br>
&gt;<br>
&gt;                 &lt;epc:phrase ref=&quot;page:nofulltextwithoa2&quot; /&gt;<br>
&gt;<br>
&gt;                 &lt;br /&gt;<br>
&gt;<br>
&gt;                 &lt;epc:debug expr=&quot;oa_url&quot; /&gt;<br>
&gt;<br>
&gt;                 &lt;br /&gt;<br>
&gt;<br>
&gt;                 &lt;epc:print expr=&quot;oa_url&quot; /&gt;<br>
&gt;<br>
&gt;<br>
&gt; The epc:print expression at the bottom gave me the link fully <br>
&gt; rendered. What I would like to do is create a piece of text with the <br>
&gt; link in saying &quot;Open Access Link&quot;. Unfortunately, {oa_url} evaluates to:<br>
&gt;<br>
&gt; &lt;a href=&quot;<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" originalSrc="http://www.bbc.co.uk/" shash="y7IuGlXrfofYU57+tpmO1/vMvSTKpmHLhCmWzb2U4OeJYN7GhEAGD0MCbbLVf3XrLQYb6eLDe09zoBjnXNSLxQHtdbS+ByhEde4bjT7n0aRU75ytiBv1qJjWk4MITkyypgN/Fn3lh1SXoYiWcfWzPQgW/OpfVWOmMbe2D1k7doE=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6311ae73edf34014199a08d6966b76f9%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;amp;sdata=nguE05y3lDdvGrQGW4uQGxGhww75YZB4aQ5azGB1YAc%3D&amp;amp;reserved=0</a> <br>
&gt; &lt;<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" originalSrc="http://www.bbc.co.uk/" shash="y7IuGlXrfofYU57+tpmO1/vMvSTKpmHLhCmWzb2U4OeJYN7GhEAGD0MCbbLVf3XrLQYb6eLDe09zoBjnXNSLxQHtdbS+ByhEde4bjT7n0aRU75ytiBv1qJjWk4MITkyypgN/Fn3lh1SXoYiWcfWzPQgW/OpfVWOmMbe2D1k7doE=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6311ae73edf34014199a08d6966b76f9%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;amp;sdata=nguE05y3lDdvGrQGW4uQGxGhww75YZB4aQ5azGB1YAc%3D&amp;amp;reserved=0</a>&gt; <br>
&gt; &lt;<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" originalSrc="http://www.bbc.co.uk/" shash="y7IuGlXrfofYU57+tpmO1/vMvSTKpmHLhCmWzb2U4OeJYN7GhEAGD0MCbbLVf3XrLQYb6eLDe09zoBjnXNSLxQHtdbS+ByhEde4bjT7n0aRU75ytiBv1qJjWk4MITkyypgN/Fn3lh1SXoYiWcfWzPQgW/OpfVWOmMbe2D1k7doE=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6311ae73edf34014199a08d6966b76f9%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;amp;sdata=nguE05y3lDdvGrQGW4uQGxGhww75YZB4aQ5azGB1YAc%3D&amp;amp;reserved=0</a> <br>
&gt; &lt;<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" originalSrc="http://www.bbc.co.uk/" shash="y7IuGlXrfofYU57+tpmO1/vMvSTKpmHLhCmWzb2U4OeJYN7GhEAGD0MCbbLVf3XrLQYb6eLDe09zoBjnXNSLxQHtdbS+ByhEde4bjT7n0aRU75ytiBv1qJjWk4MITkyypgN/Fn3lh1SXoYiWcfWzPQgW/OpfVWOmMbe2D1k7doE=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6311ae73edf34014199a08d6966b76f9%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;amp;sdata=nguE05y3lDdvGrQGW4uQGxGhww75YZB4aQ5azGB1YAc%3D&amp;amp;reserved=0</a>&gt;&gt;&quot;&gt;Open <br>
&gt; Access link&lt;/a&gt;<br>
&gt;<br>
&gt; and the debug gives me:<br>
&gt; &lt;a href=&quot;<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" originalSrc="http://www.bbc.co.uk/" shash="y7IuGlXrfofYU57+tpmO1/vMvSTKpmHLhCmWzb2U4OeJYN7GhEAGD0MCbbLVf3XrLQYb6eLDe09zoBjnXNSLxQHtdbS+ByhEde4bjT7n0aRU75ytiBv1qJjWk4MITkyypgN/Fn3lh1SXoYiWcfWzPQgW/OpfVWOmMbe2D1k7doE=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6311ae73edf34014199a08d6966b76f9%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;amp;sdata=nguE05y3lDdvGrQGW4uQGxGhww75YZB4aQ5azGB1YAc%3D&amp;amp;reserved=0</a> <br>
&gt; &lt;<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" originalSrc="http://www.bbc.co.uk/" shash="y7IuGlXrfofYU57+tpmO1/vMvSTKpmHLhCmWzb2U4OeJYN7GhEAGD0MCbbLVf3XrLQYb6eLDe09zoBjnXNSLxQHtdbS+ByhEde4bjT7n0aRU75ytiBv1qJjWk4MITkyypgN/Fn3lh1SXoYiWcfWzPQgW/OpfVWOmMbe2D1k7doE=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6311ae73edf34014199a08d6966b76f9%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;amp;sdata=nguE05y3lDdvGrQGW4uQGxGhww75YZB4aQ5azGB1YAc%3D&amp;amp;reserved=0</a>&gt;&quot;&gt;<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" originalSrc="http://www.bbc.co.uk/" shash="y7IuGlXrfofYU57+tpmO1/vMvSTKpmHLhCmWzb2U4OeJYN7GhEAGD0MCbbLVf3XrLQYb6eLDe09zoBjnXNSLxQHtdbS+ByhEde4bjT7n0aRU75ytiBv1qJjWk4MITkyypgN/Fn3lh1SXoYiWcfWzPQgW/OpfVWOmMbe2D1k7doE=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6311ae73edf34014199a08d6966b76f9%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;amp;sdata=nguE05y3lDdvGrQGW4uQGxGhww75YZB4aQ5azGB1YAc%3D&amp;amp;reserved=0</a> <br>
&gt; &lt;<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" originalSrc="http://www.bbc.co.uk/" shash="y7IuGlXrfofYU57+tpmO1/vMvSTKpmHLhCmWzb2U4OeJYN7GhEAGD0MCbbLVf3XrLQYb6eLDe09zoBjnXNSLxQHtdbS+ByhEde4bjT7n0aRU75ytiBv1qJjWk4MITkyypgN/Fn3lh1SXoYiWcfWzPQgW/OpfVWOmMbe2D1k7doE=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.bbc.co.uk%2F&amp;amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6311ae73edf34014199a08d6966b76f9%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;amp;sdata=nguE05y3lDdvGrQGW4uQGxGhww75YZB4aQ5azGB1YAc%3D&amp;amp;reserved=0</a>&gt;&lt;/a&gt;<br>
&gt;<br>
&gt; I realise {}, debug and epc:print are essentially generating the same <br>
&gt; thing, I&#39;m just trying to use them differently/incorrectly. Obviously <br>
&gt; I can&#39;t put a whole &lt;a&gt;&lt;/a&gt; as a href value.<br>
&gt;<br>
&gt; Is there a way I can access just the link within oa_url?<br>
&gt;<br>
&gt; The oa_url field is in my:<br>
&gt;<br>
&gt; $c-&gt;{summary_page_metadata} = [qw/<br>
&gt;<br>
&gt; but we want to make it incredibly obvious to users that the OA link is <br>
&gt; there.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; James<br>
&gt;<br>
&gt; *** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" rel="noreferrer" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>
&gt; *** Archive: <a href="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" originalSrc="http://www.eprints.org/tech.php/" shash="J00MTascDw68RTOmMw6K+aVwIIdchsk/72Tv+FYJb/lcwaoOIshlDwLSkLBcD2+WSvxn45qJD0cjbElFcSlTlhhlWOUnPJ7JGX2m506zLZF1EAL3xzYsxJDPLVlMS8yW6F4Azp/T0RBENqnIbIUxQdn+wXLGAeBMzbQcbUvg05Y=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6311ae73edf34014199a08d6966b76f9%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;amp;sdata=U6gcd8km6zVXnIxso5AfG3GxVkbZVRiUHPGzvGmHppU%3D&amp;amp;reserved=0</a><br>
&gt; *** EPrints community wiki: <a href="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" originalSrc="http://wiki.eprints.org/" shash="LvbaQtDXcZMR2MOlqAehkb8MyH3yUDsmmYBmX7B7mL9I6gkLciaJdjF200fddKyOBOYXq593KrWdJrnpSK56HNRGMQT/lY7SvnALaeOvz087LS3s2RXIgLi+W2PkyRh+LzE7DLKkz0a/bSDC77nb4t3k+0BIvh2Izxji+BzE1YA=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6311ae73edf34014199a08d6966b76f9%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;amp;sdata=k8ySYfQdCqSeHVRebC%2B23HvPPjKNWAqKp7faZi16Gc8%3D&amp;amp;reserved=0</a><br>
&gt; *** EPrints developers Forum: <a href="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" originalSrc="http://forum.eprints.org/" shash="q+UFS2oeSD+i8PzGvI1NIKr7GIBdz6DIvHFtK20nIkhXHNjBLDBYSlIM6O5sMsqMFTP4G0HVzfPLk8BwFA9TUv2GiqJH4HlcVLFBZS5StK2UtSdt/PJDW2IYrDsK28ZsL0R2Wsptxg7VJE4H0kb9dIwp2+MGRKA3e7UKvZ5o8uY=" rel="noreferrer" target="_blank">https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&amp;amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6311ae73edf34014199a08d6966b76f9%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;amp;sdata=%2BGPMtDxfDRZWPfcuWB40G8Wp7hPZVDFyIBDjIDUuSck%3D&amp;amp;reserved=0</a><br>
<br>
*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" rel="noreferrer" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>
*** Archive: <a href="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" originalSrc="http://www.eprints.org/tech.php/" shash="J00MTascDw68RTOmMw6K+aVwIIdchsk/72Tv+FYJb/lcwaoOIshlDwLSkLBcD2+WSvxn45qJD0cjbElFcSlTlhhlWOUnPJ7JGX2m506zLZF1EAL3xzYsxJDPLVlMS8yW6F4Azp/T0RBENqnIbIUxQdn+wXLGAeBMzbQcbUvg05Y=" rel="noreferrer" target="_blank">http://www.eprints.org/tech.php/</a><br>
*** EPrints community wiki: <a href="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" originalSrc="http://wiki.eprints.org/" shash="LvbaQtDXcZMR2MOlqAehkb8MyH3yUDsmmYBmX7B7mL9I6gkLciaJdjF200fddKyOBOYXq593KrWdJrnpSK56HNRGMQT/lY7SvnALaeOvz087LS3s2RXIgLi+W2PkyRh+LzE7DLKkz0a/bSDC77nb4t3k+0BIvh2Izxji+BzE1YA=" rel="noreferrer" target="_blank">http://wiki.eprints.org/</a><br>
*** EPrints developers Forum: <a href="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" originalSrc="http://forum.eprints.org/" shash="q+UFS2oeSD+i8PzGvI1NIKr7GIBdz6DIvHFtK20nIkhXHNjBLDBYSlIM6O5sMsqMFTP4G0HVzfPLk8BwFA9TUv2GiqJH4HlcVLFBZS5StK2UtSdt/PJDW2IYrDsK28ZsL0R2Wsptxg7VJE4H0kb9dIwp2+MGRKA3e7UKvZ5o8uY=" rel="noreferrer" target="_blank">http://forum.eprints.org/</a><br>
</blockquote></div>