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

[EP-tech] Re: DataObj->render_citation options



Thanks Adam, kind of useful - I was trying to figure out if it was possible to pass a 'nolink' flag from a call to DataObj->render_citation($style, %opts)  that will get picked up by Metafield->render_value($session, $value, $alllangs, $nolink, $object) but I keep getting lost in the twisty rabbit warren between the functions!

From: Adam Field [mailto:af05v at ecs.soton.ac.uk]
Sent: 10 July 2015 09:21
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] Re: DataObj->render_citation options

The actual rendering happens here:

                https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/Citation/EPC.pm#L64

But is is a confusing, twisty route.  A call to render_citation should look like this:

$eprint->render_citation('citation_name', %params);

...where params is a hash that looks like this:

(
                thing1 => DOM_OBJECT,
                thing2 => DOM_OBJECT,
                flags => {
                                flag1 => 1,
                                flag2 => 0,
                                flag3 => 1,
                },
)

Params are things that are passed through that may be used in the citation.  Generally speaking, these are dom objects to be put into the citation or flags to base conditionals upon.

Does that help?

--
Adam Field
Business Relationship Manager and Community Lead
EPrints Services

I am currently not working in the UK.  Due to timezone differences (GMT -9) email responses may take longer.

On 9 Jul 2015, at 20:21, Alan.Stiles <alan.stiles at open.ac.uk<mailto:alan.stiles at open.ac.uk>> wrote:


Can anyone point me to a wiki page or a .pm file that defines what the possible values for %opts are for DataObj->render_citation() ?

I'm having a complete failure to figure out what they are or what the chain of functions is that finally leads to the Metafield->render_value function
Thanks!
Alan
-- 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/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20150710/910fa4a3/attachment.html