Hyde abstract in an specific section

Good afternoon. This is my first time writing on the forum, so greetings to everyone and thanks in advance.
I need to hide the abstract from one of my journal’s sections.
I think that I could modify the article_details.tpl template in the abstract section (line 182), adding a line that prevents that section from running if the section is the one I specify. Something like IF section NOT=‘mysection’, but I’m unfamiliar with the syntax.
Can you help me?

Thank you very much,
LD

Hi @LD01,

Can you please indicate which version of OJS you’re using (e.g. 3.3.0-20) ? In the future, please indicate this in your posts here on the forum as it is necessary for others to assist you in troubleshooting.

-Roger
PKP Team

I’m sorry. My OJS version is 3.3.0.20

Hi @LD01,

Is it the case that your articles have abstracts and you just want to hide them, or that articles in this section just don’t have abstracts at all (in which case you’re lokely better off indicating this in the section settings, and not modifying the code).

-Roger
PKP Team

The articles have abstracts and I want to hide them only in a section of the magazine called “Reseñas judiciales”.

I’ll answer myself.
The correct syntax for what I needed is:

{if $section->getLocalizedTitle() != 'RJ'}

I modified the code that displays the abstract in the article_details.tpl template as follows, and it works for me as expected:

{* Abstract *}
{if $publication->getLocalizedData('abstract') && $section->getLocalizedTitle() != 'RJ'}			
	<section class="item abstract">
		<h2 class="label">{translate key="article.abstract"}</h2>
		{$publication->getLocalizedData('abstract')|strip_unsafe_html}
	</section>
{/if}

Thank you very much anyway.

1 Like

This topic was automatically closed after 6 days. New replies are no longer allowed.