<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mv="http://macVmlSchemaUri" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Courier New";
        panose-1:2 7 3 9 2 2 5 2 4 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:sans-serif;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:serif;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Corbel;
        panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
        {font-family:MingLiU;
        panose-1:2 2 5 9 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:595.0pt 842.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">What kind of page, and what’s your use-case?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> Item page: it’s possible to call the url function of an object<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> Browse view page: Should be possible, but might require some fancy footwork<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> Static page: Not sure, but I don’t think I’ve ever seen a way to do it<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"> Screen plugin: there’s a redirect_to_me_url function<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black"> <o:p></o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="border:none;border-top:solid #2C3841 1.0pt;padding:0cm 0cm 3.0pt 0cm">
<p class="MsoNormal"><a href="http://www.jisc.ac.uk/"><span style="text-decoration:none"><img border="0" width="60" height="35" id="_x0000_i1027" src="cid:image001.png@01D1DD11.292FDC40"></span></a><span style="font-size:11.0pt;font-family:Calibri"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td valign="top" style="padding:7.5pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-family:Corbel;color:#2C3841">Adam Field</span></b><br>
<span style="font-family:Corbel;color:#2C3841">SHERPA services analyst developer</span><span style="font-size:11.0pt;font-family:Calibri"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black"><eprints-tech-bounces@ecs.soton.ac.uk> on behalf of "jens.vieler@id.uzh.ch" <jens.vieler@id.uzh.ch><br>
<b>Reply-To: </b>"eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk><br>
<b>Date: </b>Wednesday, 13 July 2016 11:58<br>
<b>To: </b>"eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk><br>
<b>Subject: </b>[EP-tech] How to find out, which ist the current URL of a page?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p><span style="font-size:10.0pt;font-family:"sans-serif","serif"">Again,</span><br>
<br>
<span style="font-size:10.0pt;font-family:"sans-serif","serif"">how to find out, which ist the current URL of a page?</span><br>
<br>
<span style="font-size:10.0pt;font-family:"sans-serif","serif"">We found out, that perl_lib/EPrints/Script.pm supports current_user and current_lang, but why there is no current_url?</span><br>
<br>
<span style="font-size:10.0pt;font-family:"sans-serif","serif"">Line 86:</span><br>
<span style="font-size:10.0pt;font-family:"sans-serif","serif"">$state->{current_user} = $state->{session}->current_user;</span><br>
<span style="font-size:10.0pt;font-family:"sans-serif","serif"">$state->{current_lang} = [$state->{session}->get_langid, "STRING" ];</span><br>
<span style="font-size:10.0pt;font-family:"sans-serif","serif"">$state->{current_url} = [$state->{session}->current_url, "STRING" ];</span><br>
<br>
<span style="font-size:10.0pt;font-family:"sans-serif","serif"">Works fine within a templates <epc...>-statement!</span><br>
<br>
<span style="font-size:10.0pt;font-family:"sans-serif","serif"">Are there alternatives?<br>
Cheers</span><br>
<span style="font-size:10.0pt;font-family:"sans-serif","serif""> Jens</span><br>
<br>
<span style="font-size:10.0pt;font-family:"sans-serif","serif"">-- <br>
Jens Vieler<br>
Informatikdienste<br>
Universität Zürich</span><span style="font-size:10.0pt;font-family:MingLiU"><br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif"">Stampfenbachstrasse 73</span><span style="font-size:10.0pt;font-family:MingLiU"><br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif"">CH-8006 Zürich</span><span style="font-size:10.0pt;font-family:MingLiU"><br>
<br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif"">mail: jens.vieler@id.uzh.ch</span><span style="font-size:10.0pt;font-family:MingLiU"><br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif"">phone: +41 44 63 56777</span><span style="font-size:10.0pt;font-family:MingLiU"><br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif""><a href="http://www.id.uzh.ch">http://www.id.uzh.ch</a></span><br>
<br>
<img border="0" width="16" height="16" id="_x0000_i1025" src="cid:image002.gif@01D1DD11.292FDC40" alt="nactive hide details for jens.vieler---12.07.2016 15:49:26---Dear List, i"><span style="font-size:10.0pt;font-family:"sans-serif","serif";color:#424282">jens.vieler---12.07.2016
15:49:26---Dear List, i want to show (or not) content, ruled by a template, depending on the</span><br>
<br>
<span style="font-size:7.5pt;font-family:"sans-serif","serif";color:#5F5F5F">Von:
</span><span style="font-size:7.5pt;font-family:"sans-serif","serif"">jens.vieler@id.uzh.ch</span><br>
<span style="font-size:7.5pt;font-family:"sans-serif","serif";color:#5F5F5F">An: </span>
<span style="font-size:7.5pt;font-family:"sans-serif","serif"">(eprints-tech@ecs.soton.ac.uk) <eprints-tech@ecs.soton.ac.uk></span><br>
<span style="font-size:7.5pt;font-family:"sans-serif","serif";color:#5F5F5F">Datum:
</span><span style="font-size:7.5pt;font-family:"sans-serif","serif"">12.07.2016 15:49</span><br>
<span style="font-size:7.5pt;font-family:"sans-serif","serif";color:#5F5F5F">Betreff:
</span><span style="font-size:7.5pt;font-family:"sans-serif","serif"">[EP-tech] Template action depending on a documents URL</span><br>
<span style="font-size:7.5pt;font-family:"sans-serif","serif";color:#5F5F5F">Gesendet von:
</span><span style="font-size:7.5pt;font-family:"sans-serif","serif"">eprints-tech-bounces@ecs.soton.ac.uk</span><o:p></o:p></p>
<div class="MsoNormal">
<hr size="2" width="100%" noshade="" style="color:#8091A5" align="left">
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
<br>
<span style="font-size:10.0pt;font-family:"sans-serif","serif"">Dear List,</span><span style="font-family:"serif","serif""><br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif""><br>
i want to show (or not) content, ruled by a template, depending on the documents URL. Specific problem: the default template is serving a search<br>
input field, which doesn't make sense for the search itself. So i want to exclude this form if i am already inside simple od advanced search.</span><span style="font-family:"serif","serif""><br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif""><br>
Does anybody could give me a 3-line code example of howto deal with <epc:if...> in context with the url of a document?</span><span style="font-family:"serif","serif""><br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif""><br>
Best regards<br>
Jens</span><span style="font-family:"serif","serif""><br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif""><br>
-- <br>
Jens Vieler<br>
Informatikdienste<br>
Universität Zürich</span><span style="font-size:10.0pt;font-family:MingLiU"><br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif"">Stampfenbachstrasse 73</span><span style="font-size:10.0pt;font-family:MingLiU"><br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif"">CH-8006 Zürich</span><span style="font-size:10.0pt;font-family:MingLiU"><br>
<br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif"">mail: jens.vieler@id.uzh.ch</span><span style="font-size:10.0pt;font-family:MingLiU"><br>
</span><span style="font-size:10.0pt;font-family:"sans-serif","serif"">phone: +41 44 63 56777<u><span style="color:blue"><br>
</span></u></span><a href="http://www.id.uzh.ch/"><span style="font-size:10.0pt;font-family:"sans-serif","serif"">http://www.id.uzh.ch</span></a><tt><span style="font-size:10.0pt">*** Options:
<a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a></span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>*** Archive: <a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a></tt><br>
<tt>*** EPrints community wiki: <a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a></tt><br>
<tt>*** EPrints developers Forum: <a href="http://forum.eprints.org/">http://forum.eprints.org/</a></tt></span><o:p></o:p></p>
</div>
</div>
</div>
<font size="1"> <font face="Corbel"> <br />
Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.<br /><br />
Jisc Services Limited is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under company number 2881024, VAT number GB 197 0632 86. The registered office is: One Castle Park, Tower Hill, Bristol BS2 0JA. T 0203 697 5800.
</font></font></body>
</html>