[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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?
>