EPrints Technical Mailing List Archive

Message: #03558


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

[EP-tech] Re: Different templates for abstract pages


Hi Alan,
I'm guessing this is a 'restart apache' issue.

When EPrints starts up, it looks for various files, and keeps track of them.
If you add a new file (e.g. a phrase file, a template, an auto .js or .css file), EPrints doesn't know about it to keep track of it.

You can also do a:
~/bin/epadmin reload ARCHIVEID
which should also work, but it's worth restarting Apache at some point too - otherwise your error logs will fill up with 'config reloaded since last restart' type messages!

Does that help?

Cheers,
John

-----Original Message-----
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Alan.Stiles
Sent: 21 October 2014 16:26
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: Different templates for abstract pages

John, or anyone else feeling inspired

I'm clearly missing something - when I try to do this (in 3.3.10), having modified eprint_render.pl  I get an error  on the browse page and in the error log

------------------------------------------------------------------
---------------- EPrints System Error ----------------------------
------------------------------------------------------------------
Error. Template not loaded.
Language: en
Template ID: my_template

------------------------------------------------------------------

I've created a template file (copy of summary_page.xml) in  .../archives/ARCHIVE_ID/cfg/citations/eprints/my_template.xml

Have I created it in the wrong place, or failed to register it somewhere?  

Thanks in frustration
Alan


-----Original Message-----
From: Alan.Stiles [mailto:alan.stiles@open.ac.uk] 
Sent: 10 October 2014 14:00
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: Different templates for abstract pages

Excellent work John,
That is likely to be very relevant to me in the near future - might save me fighting with trying to update the default citation and summary_page citation within a plugin!

Cheers!
Alan

-----Original Message-----
From: John Salter [mailto:J.Salter@leeds.ac.uk]
Sent: 10 October 2014 11:48
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Different templates for abstract pages

Hi,
Yesterday I discovered that EPrints has an easy way to control which template is used to render the summary page/abstract page of an item. There isn't any mention of this in the code or documentation - but I think it's a really neat bit of functionality.

I've written it up briefly here: http://wiki.eprints.org/w/Abstract_page_template - basically you just return an extra value from the 'eprint_render' function.

Hopefully this will be useful to someone somewhere!

Cheers,
John

*** 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.

*** 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/