<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>It's set here:</p>
<p><a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Fperl_lib%2FEPrints%2FApache%2FRewrite.pm%23L482&amp;data=01%7C01%7C%7C64c6780b6cd448bcab4d08d73840af2d%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=1ougz%2F7a24ZTmwa5Skmeq2n2%2B8teJABmiyMPwwJtZjQ%3D&amp;reserved=0" originalsrc="https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/Apache/Rewrite.pm#L482" shash="OPMQM/o8IzRd8&#43;4QPVNSeb8tqKb5zHk&#43;7oYotv4Cm8&#43;U20L53Bt&#43;zSgvsUsur7zZ612GCQK9QLr9ZX6ecRW8SHW/13Je38eGRZ2m5FN9yV667AOW5DSpEYqaS78YbyX7EFWA8QR3KaA9FBxxj2ReRIC7K3XTu5DArF9y2M0hCL4=">https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/Apache/Rewrite.pm#L482</a></p>
<p><span class="pl-smi">$r</span><span class="pl-k">-&gt;</span>set_handlers(<span class="pl-c1">PerlResponseHandler</span>
<span class="pl-k">=&gt;</span> [ <span class="pl-s"><span class="pl-pds">'</span>EPrints::Apache::Template<span class="pl-pds">'</span></span> ] );</p>
<p>If the URL is not a document or EPrint URL, and ends in .html then apache is told to use that handler. See
<a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fperl.apache.org%2Fdocs%2F2.0%2Fuser%2Fhandlers%2Fhttp.html%23PerlResponseHandler&amp;data=01%7C01%7C%7C64c6780b6cd448bcab4d08d73840af2d%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=5RMrMt1e7P3DzYwLEjpgiZqqBl0ynzMaAWU%2FMjUxijk%3D&amp;reserved=0" originalsrc="https://perl.apache.org/docs/2.0/user/handlers/http.html#PerlResponseHandler" shash="JWBmpHjo2Ry46QE42Wv54uxQHo0FE7PmIjlLjqTT6d4X0FxzrMj2k5QwK0SgfUOzNT2xv/5kDXJnD0AQojq87ybLamdvk4ZnFJNjXVe1Hfji1nNCTnJMveAlipNj0hcH1v2tPElwAiOMT5TYeROITpdSBsyP7bKq42lE0ZdVT5w=">
https://perl.apache.org/docs/2.0/user/handlers/http.html#PerlResponseHandler</a></p>
<p>The term &quot;pin&quot; is short for lynchpin because that was the term for gaps you left in pre-prepared spells to fill them in at the time you cast them, in a roleplay system I was playing when I designed that bit of the system. It's not perfect, but it's not done
 badly as a solution for web templating.<br>
</p>
<div class="moz-cite-prefix">On 13/09/2019 12:36, James Kerwin via Eprints-tech wrote:<br>
</div>
<blockquote type="cite" cite="mid:EMEW3|d1cc90086be5365cc9c4d8f4f7fb0cb3v8CCbj14eprints-tech-bounces|ecs.soton.ac.uk|CAKkNZ9B8kHDjNPftB3xzAe3OwA8y8k0k7AKHfogQ17wLpteziQ@mail.gmail.com">
<div dir="ltr">Hi All,<br>
<div><br>
</div>
<div>I've decided to go back and revisit pins to see how they work. Starting with the &quot;main&quot; pin in my repository default template:</div>
<div><br>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<blockquote style="margin:0 0 0
              40px;border:none;padding:0px">
<div>&lt;epc:pin ref=&quot;page&quot;/&gt;</div>
</blockquote>
</blockquote>
</blockquote>
<div><br>
</div>
<div>According to the EPrints wiki Aprints:Apachec:Template.pm is what I want to look at. Going here I can see a sub:</div>
<div><br>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<blockquote style="margin:0 0 0
              40px;border:none;padding:0px">
<div>sub handler {</div>
<div><br>
</div>
</blockquote>
</blockquote>
</blockquote>
This subroutine does STUFF to some filename and ends with a call to &quot;prepare_page&quot; which I assume prepares the page.
<div><br>
</div>
<div>Excuse me if this is really obvious or naive, but what causes &quot;handler&quot; to be called in the first instance? I've done so many greps and searched everywhere. I've even looked at bin/generate_static to see if that gives any clues. The notes in this module
 indicate that it's ran on server start-up, but does anybody know when &quot;handler&quot; is called? I want to see how the filenames are passed to handler.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>James&nbsp;</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7C%7C64c6780b6cd448bcab4d08d73840af2d%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=OU81HLzZmfGWmHxkyUaJ6aizFbO82Uw4bLz8TxyQigg%3D&amp;reserved=0" originalsrc="http://www.eprints.org/tech.php/" shash="Hdf65gLduJpEljlpE9NIBG7zRLVLpXMTAC1O2rPy&#43;B1dYxu9lPn6yFCKUZoRvDY1AAMNyohdFBXE8hL&#43;sSYJGL4WVAC6Kw95RpaFLgg3jRI7fJrdlexCCZeAFyhCAbdUqsCsfeZq7VEmCD6Z&#43;JrQxhFzVCj79fJSgtdLY0BGnKw=">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7C%7C64c6780b6cd448bcab4d08d73840af2d%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=BxW%2FbrCSEWz68e7YBjbhH9vXnikX9D8EA24TmcPJNKM%3D&amp;reserved=0" originalsrc="http://wiki.eprints.org/" shash="Q06kqaIW7Nu48hpIk4I0DW&#43;5O46RbaWInZ8Eyo0emAyikZlfAQdHbYCK/QmqBZBhDdjFGIfaje20wCVDH8xmuZ8ylCcx59FvOA9jXOWwvy056pQPm07lT2IT/SE01Ynk4iQANNjbmcbUXsde6fmrCs13/rSjCsR5bKoygCTF&#43;MM=">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&amp;data=01%7C01%7C%7C64c6780b6cd448bcab4d08d73840af2d%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=RSNe4PlgiN6PbJ%2Bt7YUWLIs%2B56wWjV%2BGoz1pU%2BqGULM%3D&amp;reserved=0" originalsrc="http://forum.eprints.org/" shash="jrZCl3dlO2upR2QV4evzWHADnJ0sMKF5loupbYEo0PADlCplz6oEP&#43;jFkHo&#43;pUl87zMBweu94bSOsaJyRzWLEsbtTvTMwDTgSXHIgH/aZlkC4kIT7qP2GwOw1o/ZAn/YIYO3k2CWog/u1OL5sa8hBfQVEL2v/Ld3FzpMy0q1s68=">http://forum.eprints.org/</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Christopher Gutteridge <a class="moz-txt-link-rfc2396E" href="mailto:totl@soton.ac.uk">&lt;totl@soton.ac.uk&gt;</a> 
You should read our team blog at <a class="moz-txt-link-freetext" href="http://blog.soton.ac.uk/webteam/">http://blog.soton.ac.uk/webteam/</a></pre>
</body>
</html>