Theme and SubmissionAgency

Hi all,

  • Application Version OJS 3.1.2-1
  • Description of issue
    I would like to be able to display SubmissionAgency for my article.
    My idea is to create a new theme from boostrap3 and to customize the file article_details.tpl.
    But I don’t understand how to modify article_details.tpl, what function do i have to call to get SubmissionAgency link to my article.
    Any help or idea would be great.

Thomas

After some digging and some reading

inthe .inc.php og the theme add this method

	/**
	 * @param $hookname string
	 * @param $args array [
	 *      @option TemplateManager
	 *      @option string relative path to the template
	 * ]
	 * @brief Add section-specific data to the indexJournal and issue templates
	 */
	public function addArticleAgenciesData($hookname, $args) {
	  
	    $templateMgr = $args[0];
	    
	    $submissionAgencyDao = DAORegistry::getDAO('SubmissionAgencyDAO');
	    
	    $article = $templateMgr->get_template_vars('article');
	    
	    if (!$article) 
	    {
	        return false;
	    }
	    else{
	        
	        $templateMgr->assign('agencies', $submissionAgencyDao->getAgencies($article->getId(), array(AppLocale::getLocale())));    
	    }
	    
	}

In the tpl file add this

			{if !empty($agencies[$currentLocale])}
				<div class="panel panel-default issue">
					<div class="panel-heading">
				    	{"Agency"}
					</div>
					<div class="panel-body">
				    		{foreach from=$agencies item=agency} 
				    			{" ; "|implode:$agency}
							{/foreach}
					</div>
				</div>
			{/if}

Hope it’s help