Block plugin and doi passing to template

Hi Fellow Developer.

I am new to OJS world and still trying to understand OJS as product . I am currently working on building plugin for displaying badges. I have done all attempt logically here and finally able to show badges in side bar with plugin as Block plugin.

Just wondering how I should pass DOI dynamically to block manager. I tried (GitHub - sedici/badges: OJS plugin for displaying altmetric badges) as well but could not get working

$smarty =& $params[1];

        $output =& $params[2];

    $article = $smarty->get_template_vars('article');

        if ($article->getStoredPubId('doi'))

              $doi = $article->getStoredPubId('doi');

        $templateMgr->assign('doi', $doi);

        $title = $customBlockTitle[$currentLocale] ? $customBlockTitle[$currentLocale] : $customBlockTitle[$contextPrimaryLocale];

        $content = $customBlockContent[$currentLocale] ? $customBlockContent[$currentLocale] : $customBlockContent[$contextPrimaryLocale];

        $templateMgr->assign('customBlockTitle', $title);

        $templateMgr->assign('customBlockContent', $content);

        $templateMgr->assign('showName', $this->getSetting($contextId, 'showName'));

        return parent::getContents($templateMgr, $request);


Hi @teecellc,

You can find documentation for developers here: PKP Developer Docs - Technical guides and documentation for OJS and OMP
Let me know if it doesn’t help to solve your task