EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #08002


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

Re: [EP-tech] load a javascript and css only in abstract pages

  • To: "EPrints.org Technical List" <eprints-tech@ecs.soton.ac.uk>
  • Subject: Re: [EP-tech] load a javascript and css only in abstract pages
  • From: Yuri <yurj@alfa.it>
  • Date: Tue, 29 Oct 2019 08:26:53 +0100

Sorry, I've found eprint_render can manage head too:


=== at the end of eprint_render ===

    foreach my $key (keys %fragments)
    {
        $fragments{$key} = [$fragments{$key}, "XHTML"];
    }

    my $page = $eprint->render_citation("recollect_summary_page",
%fragments,
                                        flags => $flags);

    my $title = $eprint->render_citation("brief");
    my $links = $repository->xml()->create_document_fragment();
    if (!$preview)
    {
$links->appendChild($repository->plugin("Export::Simple")
                            ->dataobj_to_html_header($eprint));
        $links->appendChild(
$repository->plugin("Export::DC")->dataobj_to_html_header($eprint));
    } ## end if (!$preview)

    return ($page, $title, $links);
===

Il 29/10/19 08:24, Yuri ha scritto:
Hi!

 I need to insert a css and some javascript in the abstract pages (and
only there). For javascript I can use the eprint_render method to
insert them in the page. But what about css? The can be linked (they
are not small and came from a cdn) only in the head section. The page
is composed after the eprint_render method, so I don't know if I can
mess up with <head> in eprint_render.

Any idea?