Display of keywords, OJS 3.1

Hello, I am testing OJS 3.1 and entered article in issue. All metadata is visible except keywords. Is that issue left for future version of OJS or some glitch in new version?

Thanks

Keywords in metadata haven’t been indexed by Google for a several years by now. And I doubt that they ever will return to this practice.

I know that, but I work with sweveral editorial boards that require keywords and they would like to have keywords published and become vsible in metadata page.

Hi @vvucic

What do you mean they are not displayed, where exactly? – I believe they should be displayed everywhere in OJS 3.1…

Thanks!
Bozana

The keywords are not displayed in article page
http://ulumuna.or.id/index.php/ujis/article/view/2

It is a fresh install

@kawahyu, what theme do you use? – It does not look like the default theme…

It is a bootstrap theme

@NateWr, is the bootstrap theme updated to display the keywords?

Looks like no. :slight_smile:

A great opportunity for a community contribution if anyone wants to implement it! Here’s how the default theme displays keywords:

1 Like

I try the codes below

{* Keywords *}
		    {if !empty($keywords[$currentLocale])}
		    
		    <div class="panel panel-default keywords">
				<div class="panel-heading">
					Keywords:
				</div>
				<div class="panel-body">
				     <span class="value">
				      {foreach from=$keywords item=keyword}
					  {foreach name=keywords from=$keyword item=keywordItem}{$keywordItem|escape}{if !$smarty.foreach.keywords.last}, {/if}
					  {/foreach}
				      {/foreach}
			        </span>
				</div>
			{/if}  

The result is http://ulumuna.or.id/index.php/ujis/article/view/68

I customize the reference

{* References *}
			{if $article->getCitations()}
			<div class="panel panel-default article-references">
					<div class="panel-heading">
						{translate key="submission.citations"}
					</div>
					<div class="panel-body">
					    {$article->getCitations()|nl2br}
					</div>
			{/if}

How to use “See More” function for the references?

1 Like

How about subjects? I am keen to show subjects like Internal Medicine, Othopedics etc etc. There is already a provision in submission form as well as “Subjects”

Hi @varshilmehta,

You’d need to do a decent amount of custom coding to make that happen, including supplying the article details template with the subject data. You can read about passing custom data to templates in a theme here:

https://pkp.gitbooks.io/pkp-theming-guide/content/en/advanced-custom-data.html

It looks like you can fetch a submission’s subjects data with:

$submissionSubjectDao = DAORegistry::getDAO('SubmissionSubjectDAO');
$submissionSubjectDao->getSubjects($submission->getId(), $locales);
2 Likes

Hi @NateWr - This is exactly what I’m looking for. However, when inside your theme plugin.inc file how does one access the $submission object and $locales array you reference in the getSubjects method? Is there a best practice for instantiating these?

I have the article details template working with a loadTemplateData method inside our theme. I just need access to the $submission id and $locales to pull up the subjects. Thanks.

Hi @camuscando,

It depends on what template you’re injecting data into. The article details template will already have the $submission and $locales data assigned to it. In that case, you can use the following:

$request = Application::getRequest();
$templateMgr = TemplateManager::getManager($request):
$submission = $templateMgr->get_template_vars('submission');
$locales = $templateMgr->get_template_vars('locales');

You can also use $templateMgr->get_template_vars(); to inspect all the data that’s already available. This will usually be important for templates where you need to reference a specific object (for example: an article details page will always point to a specific submission).

1 Like