<div dir="ltr"><div><div><div><div><div>Dear all,<br><br></div>this is how I&#39;ve solved the issue, and I hope I&#39;ll help somebody else too. This is my eprint citation:<br><br>&lt;?xml version=&quot;1.0&quot; ?&gt;<br>    &lt;cite:citation xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot; xmlns:cite=&quot;<a href="http://eprints.org/ep3/citation">http://eprints.org/ep3/citation</a>&quot; xmlns:epc=&quot;<a href="http://eprints.org/ep3/control">http://eprints.org/ep3/control</a>&quot;&gt;<br>        &lt;epc:set name=&#39;docs&#39; expr=&#39;$item.original_documents()&#39;&gt;<br>            &lt;epc:if test=&quot;length($docs) gt 0&quot;&gt;<br>                &lt;epc:foreach expr=&quot;$docs&quot; iterator=&quot;doc&quot; limit=&quot;1&quot;&gt;<br>                    &lt;div class=&quot;col-md-3&quot;&gt;<br>                        &lt;div class=&quot;thumbnail&quot;&gt;<br>                            &lt;epc:set name=&#39;covers&#39; expr=&#39;$item.cover_image()&#39;&gt;<br>                                &lt;epc:if test=&quot;length($covers) gt 0&quot;&gt;<br>                                    &lt;epc:foreach expr=&quot;$covers&quot; iterator=&quot;cover&quot; limit=&quot;1&quot;&gt;<br>                                        &lt;cite:linkhere&gt;&lt;img src=&quot;{$cover.thumbnail_url(&#39;medium&#39;)}&quot; class=&quot;img-rounded img-responsive&quot; /&gt; &lt;/cite:linkhere&gt;<br>                                    &lt;/epc:foreach&gt;<br>                                &lt;/epc:if&gt;<br>                                &lt;epc:if test=&quot;length($covers) gt 0&quot;&gt;<br>                                    &lt;cite:linkhere&gt;&lt;img src=&quot;{$doc.thumbnail_url(&#39;medium&#39;)}&quot; class=&quot;img-rounded img-responsive&quot; /&gt; &lt;/cite:linkhere&gt;<br>                                &lt;/epc:if&gt;<br>                            &lt;/epc:set&gt;<br>                            &lt;div class=&quot;caption&quot;&gt;<br>                                &lt;epc:choose&gt;<br>                                    &lt;epc:when test=&quot;type = &#39;article&#39;&quot;&gt; &lt;i class=&quot;fa fa-paperclip&quot; aria-hidden=&quot;true&quot;&gt; Document &lt;/i&gt; &lt;/epc:when&gt;<br>                                    &lt;epc:when test=&quot;type = &#39;audio&#39;&quot;&gt; &lt;i class=&quot;fa fa-music&quot; aria-hidden=&quot;true&quot;&gt; Audio&lt;/i&gt;  &lt;/epc:when&gt;<br>                                    &lt;epc:when test=&quot;type = &#39;book&#39;&quot;&gt; &lt;i class=&quot;fa fa-book&quot; aria-hidden=&quot;true&quot;&gt; Book&lt;/i&gt;  &lt;/epc:when&gt;<br>                                    &lt;epc:when test=&quot;type = &#39;image&#39;&quot;&gt; &lt;i class=&quot;fa fa-picture-o&quot; aria-hidden=&quot;true&quot;&gt; Image&lt;/i&gt;  &lt;/epc:when&gt;<br>                                    &lt;epc:when test=&quot;type = &#39;video&#39;&quot;&gt; &lt;i class=&quot;fa fa-video-camera&quot; aria-hidden=&quot;true&quot;&gt; Video&lt;/i&gt;  &lt;/epc:when&gt;<br>                                    &lt;epc:otherwise&gt; &lt;i class=&quot;fa fa-file-archive-o&quot; aria-hidden=&quot;true&quot;&gt; Archive &lt;/i&gt; &lt;/epc:otherwise&gt;<br>                                &lt;/epc:choose&gt;<br>                                &lt;epc:choose&gt;<br>                                    &lt;epc:when test=&quot;strlen(title) gt 80&quot;&gt;<br>                                        &lt;h3&gt;&lt;cite:linkhere&gt;&lt;epc:print expr=&quot;substr(title,0,70)&quot; /&gt;...&lt;/cite:linkhere&gt;&lt;/h3&gt; &lt;/epc:when&gt;<br>                                    &lt;epc:otherwise&gt;<br>                                        &lt;h3&gt;&lt;cite:linkhere&gt;&lt;epc:print expr=&quot;title&quot; /&gt;&lt;/cite:linkhere&gt;&lt;/h3&gt; &lt;/epc:otherwise&gt;<br>                                &lt;/epc:choose&gt;<br>                                &lt;epc:if test=&quot;is_set(date)&quot;&gt;<br>                                    &lt;epc:print expr=&quot;substr(date.as_string(),0,4)&quot; /&gt;&lt;/epc:if&gt;<br>                                &lt;epc:if test=&quot;is_set(creators_name)&quot;&gt;<br>                                    &lt;epc:choose&gt;<br>                                        &lt;epc:when test=&quot;length(creators_name) gt 0&quot;&gt;<br>                                            &lt;epc:set name=&quot;creators&quot; expr=&quot;creators_name&quot; limit=&quot;1&quot;&gt;<br>                                                &lt;epc:foreach expr=&quot;$creators&quot; iterator=&quot;creator&quot;&gt;<br>                                                    &lt;epc:print expr=&quot;$creator&quot; /&gt; &lt;/epc:foreach&gt;<br>                                            &lt;/epc:set&gt;<br>                                        &lt;/epc:when&gt;<br>                                    &lt;/epc:choose&gt;<br>                                &lt;/epc:if&gt;<br>                            &lt;/div&gt;<br>                        &lt;/div&gt;<br>                    &lt;/div&gt;<br>                &lt;/epc:foreach&gt;<br>            &lt;/epc:if&gt;<br>        &lt;/epc:set&gt;<br>    &lt;/cite:citation&gt;<br><br><br></div>as you can see I use two procedures, that I created in <a href="http://document_fields.pl">document_fields.pl</a><br><br>{<br>package EPrints::Script::Compiled;<br><br>    sub run_original_documents {<br>        my( $self, $state, $eprint ) = @_;<br>        if( ! $eprint-&gt;[0]-&gt;isa( &quot;EPrints::DataObj::EPrint&quot;) ) {<br>            $self-&gt;runtime_error( &quot;documents() must be called on an eprint object.&quot; );<br>        }<br>        return [ [grep { $_-&gt;is_set( &quot;content&quot; ) &amp;&amp; $_-&gt;value( &quot;content&quot; ) eq &quot;original&quot; } $eprint-&gt;[0]-&gt;get_all_documents()],  &quot;ARRAY&quot; ];<br>    };<br>    sub run_cover_image {<br>        my( $self, $state, $eprint ) = @_;<br>        if( ! $eprint-&gt;[0]-&gt;isa( &quot;EPrints::DataObj::EPrint&quot;) ) {<br>            $self-&gt;runtime_error( &quot;cover_image() must be called on an eprint object.&quot; );<br>        }<br>        return [ [grep { $_-&gt;is_set( &quot;content&quot; ) &amp;&amp; $_-&gt;value( &quot;content&quot; ) eq &quot;coverimage&quot; } $eprint-&gt;[0]-&gt;get_all_documents()],  &quot;ARRAY&quot; ];<br>    }<br>}<br><br></div>The first one give me the array with the original documents, the second one the covers. Logically you should have one cover, but with users you never know :)<br><br></div>Thanks,<br></div>Denis<br><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 8, 2016 at 5:34 PM, Denis Pitzalis <span dir="ltr">&lt;<a href="mailto:denis.pitzalis@gmail.com" target="_blank">denis.pitzalis@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div dir="ltr"><div><div><div><div><div><div><div>Hi eprinters, <br><br></div>I am uploading audio to my repository as eprints. Each eprints comes with 2 documents:<br></div>1) the audio file, content: original<br></div>2) the cover, content: cover <br><br></div>then in my summary, I have:<br><br>&lt;epc:set name=&#39;docs&#39; expr=&#39;$item.original_documents()&#39;&gt;<br>                    &lt;!--&lt;epc:set name=&#39;docs&#39; expr=&#39;$item.documents()&#39;&gt;--&gt;<br>                    &lt;epc:if test=&quot;length($docs) gt 0&quot;&gt;<br>                        &lt;epc:foreach expr=&quot;$docs&quot; iterator=&quot;doc&quot; limit=&quot;1&quot;&gt;<br>                            &lt;div id=&quot;summary_downloads&quot; class=&quot;summary-widget&quot;&gt;<br>                                &lt;epc:choose&gt;<br>.....<br>                                &lt;epc:when test=&quot;$doc.thumbnail_url(&#39;audio_mp4&#39;).is_set()&quot;&gt;<br>                                        &lt;audio controls=&quot;&quot;&gt;<br>                                            &lt;source src=&quot;{$doc.thumbnail_url(&#39;audio_mp4&#39;)}&quot; type=&quot;audio/mp4&quot; /&gt;<br>                                            &lt;source src=&quot;{$doc.thumbnail_url(&#39;audio_ogg&#39;)}&quot; type=&quot;audio/ogg&quot; /&gt;<br>                                            &lt;p class=&quot;vjs-no-js&quot;&gt;<br>                                                &lt;epc:phrase ref=&#39;summary_page:vjs-no-js&#39; /&gt;<br>                                            &lt;/p&gt;<br>                                        &lt;/audio&gt;<br>                                    &lt;/epc:when&gt;<br><br></div>which is working fine, but I would like to show the cover image with the audio. How can I access it? <br><br></div>Best regards,<br></div>Denis<br></div>
</div></div><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="http://www.eprints.org/tech.php/" rel="noreferrer" target="_blank">http://www.eprints.org/tech.php/</a><br>
*** EPrints community wiki: <a href="http://wiki.eprints.org/" rel="noreferrer" target="_blank">http://wiki.eprints.org/</a><br>
*** EPrints developers Forum: <a href="http://forum.eprints.org/" rel="noreferrer" target="_blank">http://forum.eprints.org/</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><b><a href="mailto:d.pitzalis@unesco.org" style="border:none;text-decoration:none;color:#049cdb" target="_blank"><span style="color:#049cdb">Denis Pitzalis, PhD</span></a></b><br><a href="http://www.unesco.org" style="border:none;text-decoration:none;color:#b0b0b0" target="_blank"><span style="color:#b0b0b0">Web Architect/Lead Developer</span></a>
                    
                
                
                     
                
                
                    
                        <a href="http://www.unesco.org" style="border:none;text-decoration:none;color:#b0b0b0" target="_blank">
                            </a><br><br><a href="http://www.unesco.org" style="border:none;text-decoration:none;color:#b0b0b0" target="_blank"><span style="color:#b0b0b0">ERI/DPI/WEB</span></a><br><a href="https://goo.gl/maps/U2TEZ2x14MM2" style="border:none;text-decoration:none;color:#b0b0b0" target="_blank"><span style="color:#b0b0b0">7, place de Fontenoy<br>
                            75007 <span style="color:#e0e0e0">•</span> Paris <span style="color:#e0e0e0">•</span> France</span></a> <br>
                        <span style="color:#b0b0b0">Tel. +33 (0) 1 45 68 18 16</span>
                                        
                                
                
                     
                
                
                    
                        <a href="http://www.unesco.org" style="border:none;text-decoration:none;color:#b0b0b0" target="_blank">
                            </a><br><br><a href="http://www.unesco.org" style="border:none;text-decoration:none;color:#b0b0b0" target="_blank"><span style="color:#b0b0b0">http://www.unesco.org</span></a></div></div></div></div></div></div></div>
</div>