EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #02376
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: editing default pins
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: editing default pins
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Wed, 6 Nov 2013 17:33:15 +0000
I was close to figuring it out before. Once you've followed the stuff below, and made a new template to use (e.g. ~/archived/ARCHIVEID/cfg/templates/login.xml) try: sub render { my( $self ) = @_; my $processor = $self->{processor}; my $repo = $self->{repository}; my $xml = $repo->xml; my $r = $repo->get_request; #Add this: $processor->{template} = "login"; #the template name (without the .xml) ... Might have to document that in the wiki - if it's the *best* way of achieving this (anyone got other ideas how to do this)? For future development, it might be nice to be able to do: $c->{plugins}->{"Screen::Login"}->{template} = "login"; (if you can't already!) Cheers, John -----Original Message----- From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of John Salter Sent: 06 November 2013 16:51 To: eprints-tech@ecs.soton.ac.uk Subject: [EP-tech] Re: editing default pins Look at ~/perl_lib/EPrints/Plugin/Screen/Login.pm If what you want to change is contained solely within the phrases it uses, copy those phrases from ~/lib/lang/en/phrases/system.xml (or wherever they may be) to ~/archives/ARCHIVEID/cfg/lang/en/phrases/system_overrides.xml (or any sensible XML file in there). If you need to change things bit more radically: Copy ~/perl_lib/EPrints/Plugin/Screen/Login.pm to ~/archives/ARCHIVEID/cfg/plugins/EPrints/Plugin/Screen/... Use a filename like ArchiveIDLogin.pm Change the package name in that file to reflect the new name you've just given it. In ~/archives/ARCHIVEID/cfg/cfg.d/plugins.pl (or some other file in that directory), define: $c->{plugin_alias_map}->{"Screen::Login"} = "Screen::AcrchiveIDLogin"; #or whatever you've called your new copy $c->{plugin_alias_map}->{"Screen::Login"} = undef; Once you get this working OK (maybe add an extra class to something that's being rendered so you can check that the copy is being used to generate the login page), start hacking your ArchiveIDLogin.pm to do what you want it to. I thought there was some easy way to set a template for this, but currently I haven't been able to work out how :o\ I was expecting to do something like: $self->{template} = 'login'; - but this doesn't seem to work. Maybe someone else can offer guidance on how to achieve this? Cheers, John ________________________________________ From: eprints-tech-bounces@ecs.soton.ac.uk [eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Derek Lawrie [d.lawrie@nua.ac.uk] Sent: 05 November 2013 14:59 To: Eprints Subject: [EP-tech] editing default pins I'd like to edit the output of the default login form, I presume the output is generated from the epc:pin "page"? I don't know if I should be editing that or if I could apply a template to only apply to the login? Any thoughts? Thanks Derek Rated top Specialist Arts Institution in the UK (National Student Survey 2013) and best Specialist Institution in Art and Design (Complete University Guide 2014) Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, we do not accept responsibility for any errors or omissions that are present in this message, or any attachment, that have arisen as a result of e-mail transmission. If verification is required, please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the University. This email and any files sent with it are intended only for the named recipient and may be confidential. If you are not the named recipient please email the sender immediately then delete this message. You should not disclose the content, distribute or retain any copies of this message. Norwich University of the Arts, Francis House, 3-7 Redwell Street, Norwich, NR2 4SN. Tel: 01603 610561 Fax: 01603 615728 www.nua.ac.uk<http://www.nua.ac.uk> NUA Business Limited Registered office: Francis House, 3-7 Redwell Street, Norwich, NR2 4SN. Registered in England & Wales number 3001912 *** 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/
- References:
- [EP-tech] editing default pins
- From: Derek Lawrie <d.lawrie@nua.ac.uk>
- [EP-tech] Re: editing default pins
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] editing default pins
- Prev by Date: [EP-tech] Re: editing default pins
- Next by Date: [EP-tech] Re: OAI harvest in 3.3.12
- Previous by thread: [EP-tech] Re: editing default pins
- Next by thread: [EP-tech] OAI harvest in 3.3.12
- Index(es):