Adding URN galley link for issues and articles

Hello everyone,

in the old OJS version we have assigned URNs to the galleys of the articles (because the German National Library demanded it at that time). But in OJS 3.1 there is no way to see those URNs. We want to add them to the article site and the front page with the current journal. I am creating new themes for this where I could include those URNs, but because there isn’t a code snippet for it yet, I don’t know how. Could you help me there?
I know a bit PHP, so it isn’t a problem to change the I have already included the DOI on the frontpage and I was able to include the issue URN, but not the galley URN.

Kind regards

Hi Daniela,

I think you could include the URNs on the article page by editing the article details template, if I’m understanding correctly what you’re trying to do. Does that work?

Amanda Stevens
Public Knowledge Project Team

Hello @astevens,

yes, that’s what I want to do, but I don’t know how. So far the following lines can be found in the template where the URNs are displayed:

{* PubIds (requires plugins) *}
                        {foreach from=$pubIdPlugins item=pubIdPlugin}
                                {if $pubIdPlugin->getPubIdType() == 'doi'}
                                {assign var=pubId value=$article->getStoredPubId($pubIdPlugin->getPubIdType())}
                                {if $pubId}
                                        <div class="item pubid">
                                                <div class="label">
                                                <div class="value">
                                                        {if $pubIdPlugin->getResolvingURL($currentJournal->getId(), $pubId)|escape}
                                                                <a id="pub-id::{$pubIdPlugin->getPubIdType()|escape}" href="{$pubIdPlugin->getResolvingURL($currentJournal->getId(), $pubId)|escape}">
                                                                        {$pubIdPlugin->getResolvingURL($currentJournal->getId(), $pubId)|escape}

And I guess the content ist provided via

But here ist the problem: If I choose in the URN-Plugin to give me URNs for articles, they will show in the frontend (thanks to the code above). But if I choose to use URNs for galleys, they won’t show anywhere. So my question is, which lines I need to add (preferably only in my and my article_details.tpl, because I want to make changes only in my theme, not in the original files) to make these URNs appear.

I hope I could clarify what I want to do.

Thanks for your help so far!

Kind regards

Finally I found the answer and it really is so easy I am ashamed I haven’t thought of it sooner. But in case someone else has the same problem I wanted to share my findings. You just have to change the line {assign var=pubId value=$article->getStoredPubId($pubIdPlugin->getPubIdType())} to {assign var=pubId value=$galley->getStoredPubId($pubIdPlugin->getPubIdType())} to get the galley urns.