EPrints Technical Mailing List Archive

Message: #09160


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

Re: [EP-tech] Modify summary.xml


Hi Agung,

All the ep_summary_content_X are divs where eprint box screen plugins can be added.  If you want to add something in ep_summary_content_left, you would create a file in you archive's cfg/plugins/EPrints/Plugin/Screen/EPrint/Box/ with contents something like that used in:

https://bazaar.eprints.org/512/1/plugins/EPrints/Plugin/Screen/EPrint/Box/Stats.pm

Obviously change 'Stats.pm' to whatever you call your plugin.   One thing you will need to add a 'new' function for this plugin is the following:

sub new
{
    my( $class, %params ) = @_;

    my $self = $class->SUPER::new(%params);

    $self->{appears} = [
        {
            place => "summary_left",
            position => 1000,
        },
    ];
    return $self;
}

This makes sure the contents of the eprint box screen plugin appears in the ep_summary_content_left div.  The '1000' just determines the position of that box plugin relative to any other plugins in the same location.  Smaller numbers will go first and larger numbers will go later.  If you only have one eprint box screen plugin in a location, whatever the number is it does not matter, it just need to be a number.

The Stats.pm is a good example as the contents of the eprint box screen plugin can be set in a phrase.  This allows it to be customisable from the EPrints admin interface (phrase editor) if you want to change it in future.  However, if you do change the phrase, as abstract/summary pages are cached, you will need to tun refresh abstracts to get them to use the new phrase.

One issue you may have with using a eprint box screen plugin is that you get a box drawn around whatever you content you add.  You may need to do a bit of hack in your archive's CSS to hide the border outline of these boxes.

More information about how to build and add eprint box screen plugins can be found at:

https://wiki.eprints.org/w/Boxes_on_Abstract_Pages

Regards

David Newman

On 12/01/2023 10:42 pm, Agung Prasetyo W. via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Hi,

I'm trying to change the display of the summary page of eprints. If I look, there is ep_summary_content which includes ep_summary_content_left, ep_summary_content_right, ep_summary_content_top, etc.
If I want to add a section to ep_summary_content, in which file can I find it?

Thank you.

Regards,
Agung Prasetyo Wibowo

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