EPrints Technical Mailing List Archive
Message: #07507
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Phrases, Pins and If
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, "James Kerwin" <jkerwin2101@gmail.com>
- Subject: Re: [EP-tech] Phrases, Pins and If
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- Date: Thu, 4 Oct 2018 09:45:28 +0000
James, if that’s a copy-paste from your phrase file then the quotes look very unbalanced in the ‘if’s ? some may need backslash delimiting
or swapping with single quotes? Not actually sure if what you’re trying to do is feasible, but hopefully it helps? Alan From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of James Kerwin via Eprints-tech Hi All, I'm looking for some guidance with this problem: I have an EPrints phrase that uses pins. I can see where the pins are set up and create my own, so I could solve this using Perl. I want to include a condition in my phrase that depends on the value contained in the pin. Example: <epp:phrase id="eprint_thesis_notify_mail"> The embargo period has been set at: <epc:pin name="emperiod" /> with the reason being given as testZZZZZZZZZZZZZZZZZtest:<br/> <epc:if test="emreason = ''"> No reason has been provided.</epc:if> <epc:if test="<epc:pin name='emreason' /> != ''"> <epc:pin name="emreason" /> <br/><br/></epc:if> </epp:phrase> I've used different format in each IF. I comment one out depending on which I'm testing. The second one won't work which I'm not surprised about). The pin in question is this "emreason" pin. Importantly, the phrase is in the perl script
like this: $mail = $repo->html_phrase( "eprint_thesis_notify_mail", %pins ); I could do what I need in the Perl script, but this seems like a good chance to become more familiar with phrases, plus I want to use a similar set-up for another idea I have. If anybody could point me in the right direction, I would really appreciate it. Thanks, James |
- Follow-Ups:
- Re: [EP-tech] Phrases, Pins and If
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- Re: [EP-tech] Phrases, Pins and If
- References:
- [EP-tech] Phrases, Pins and If
- From: James Kerwin <jkerwin2101@gmail.com>
- Re: [EP-tech] Phrases, Pins and If
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- [EP-tech] Phrases, Pins and If
- Prev by Date: [EP-tech] Phrases, Pins and If
- Next by Date: Re: [EP-tech] Phrases, Pins and If
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):