EPrints Technical Mailing List Archive

Message: #03975


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: epc:if tests for the existence of values in a compound field


Another (completely untested) possibility
Try checking the length of creator?
e.g.  <epc:if test="length(creator) = 0">  ... </epc:if>

Alan

-----Original Message-----
From: Field A.N. [mailto:af05v@ecs.soton.ac.uk]
Sent: 25 February 2015 09:55
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: epc:if tests for the existence of values in a compound field

Try testing a sub fields (e.g. epc:if test="creator_name") and see if that works.

--
Adam Field
Business Relationship Manager and Community Lead EPrints Services




On 25 Feb 2015, at 09:49, Ian Stuart wrote:

> On 25/02/15 09:37, Field A.N. wrote:
>> Hi Ian
>>
>>      Can you be more explicit about the way in which it doesn't work?
> Specifically - when there is no data in the compound object, the
> abstract page still displays the table-headings - so you end up with a
> 1-row table, showing no data
>
> I want to replace that table with some helpful text :)
>
> I've just tried the <epc:choose> - no difference
>
> (and I chose "creator" as my compound field is a bespoke one.... the
> compound field 'broker' could just confuse people un-necessarily)
>
>>
>>      Have you considered the EPrints Control switch statement:
>>
>>              <epc:choose>
>>                      <epc:when test='creator'>....</epc:when>
>>                      <epc:otherwise>.....</epc:otherwise>
>>              </epc:choose>
>>
>>      See
>> http://wiki.eprints.org/w/EPrints_Control_Format#epc:choose.2C_epc:wh
>> en.2C_epc:otherwise
>>
>>      ...also, are you sure the field isn't called 'creators'?
>
>
>
> --
>
> Ian Stuart.
> Developer: ORI, RJ-Broker, and OpenDepot.org Bibliographics and
> Multimedia Service Delivery team, EDINA, The University of Edinburgh.
>
> http://edina.ac.uk/
>
> This email was sent via the University of Edinburgh.
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> *** Options:
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/


*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/
-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority.