EPrints Technical Mailing List Archive
Message: #06308
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Alternative text in phrase file
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] Alternative text in phrase file
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Fri, 24 Feb 2017 14:38:17 +0000
I was just pondering whether this would actually work… <epc: > is a declared namespace in phrase files - but by inspection, this is used for pins, values and other phrases, not the logical tests. I'm not sure you'd get the eprint passed to the phrase to be able to test anything on it. Cheers, John PS and I didn't read the stipulation about eprint types - you know what you're doing there it seems! Sorry! From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Adam Field I didn’t know you could use conditionals inside phrases. You can in templates. That might be the way to go. I have a memory of setting up phrases like this: <epp:phrase_id=”eprint_fieldname_official_url.masters”>sdfsdf</epp:phrase> and then selecting it with a conditional in the appropriate template. From:
<eprints-tech-bounces@ecs.soton.ac.uk> on behalf of John Salter <J.Salter@leeds.ac.uk> Hi, I think you need to have the phrase defined, and the logic inside that: You're also testing 'type' - which is normally 'article', 'thesis', 'book_chapter'… The field you might want to test it 'thesis_type'? [This is untested!] <epp:phrase id="eprint_fieldname_official_url"> <epc:choose> <epc:when test="thesis_type='master'">Adresse master</epc:when> <epc:when test="thesis_type='thesis'">Adresse these</epc:when> <epc:otherwise>Adresse URL</epc:otherwise> </epc:choose> </epp:phrase> Cheers, John From:
eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Nault, Pierre Hi, We want to display a different label in the eprint rendering page for the field <epp:phrase id="eprint_fieldname_official_url">Adresse URL</epp:phrase> if the eprint type is
‘master’ or ‘thesis’. In zzzzz.xml we have tried with <epc:choose> <epc:when test="type='master'"> <epp:phrase id="eprint_fieldname_official_url">Adresse master</epp:phrase> </epc:when> <epc:when test="type='thesis'"> <epp:phrase id="eprint_fieldname_official_url">Adresse these</epp:phrase> </epc:when> <epc:otherwise> <epp:phrase id="eprint_fieldname_official_url">Adresse URL</epp:phrase> </epc:otherwise> </epc:choose> But this is not working. Any idea why ? Regards, Pierre ---------------------------------------- Pierre Nault Bibliothécaire systèmes - Direction du développement technologique Service des bibliothèques Université du Québec à Montréal Tél : 514-987-3000 #4554
|
- References:
- Re: [EP-tech] Alternative text in phrase file
- From: Adam Field <Adam.Field@jisc.ac.uk>
- Re: [EP-tech] Alternative text in phrase file
- Prev by Date: Re: [EP-tech] Alternative text in phrase file
- Next by Date: Re: [EP-tech] Alternative text in phrase file
- Previous by thread: Re: [EP-tech] Alternative text in phrase file
- Next by thread: Re: [EP-tech] Alternative text in phrase file
- Index(es):