Display abstract button alongwith pdf button

I want to add abstract button alongwith pdf button, currenlty only pdf button exists as shown by picture below…

I want to add abstract button like below website has.

HI @Syed_Ahmed_Ali_Shah,

This will likely require modifying a theme to make these changes. What theme are you using and what version of OJS (e.g. 3.4.0-5)?

-Roger
PKP Team

HI there!

Wouldn’t this be possible by adding another galley containing just the abstract instead of the complete PDF file?

If you’re looking to add an “Abstract” button similar to the PDF or Full Text links in your article summary, here’s how I did it.

  1. Open the article_summary.tpl file located at:
    templates/frontend/objects/article_summary.tpl

  2. Find the following block of code responsible for displaying the article galleys (PDF, Full Text, etc.):

    {if !$hideGalleys}
        <ul class="galleys_links">
            {foreach from=$article->getGalleys() item=galley}
                {if $primaryGenreIds}
                    {assign var="file" value=$galley->getFile()}
                    {if !$galley->getRemoteUrl() && !($file && in_array($file->getGenreId(), $primaryGenreIds))}
                        {continue}
                    {/if}
                {/if}
                <li>
                    {assign var="hasArticleAccess" value=$hasAccess}
                    {if $currentContext->getSetting('publishingMode') == $smarty.const.PUBLISHING_MODE_OPEN || $publication->getData('accessStatus') == $smarty.const.ARTICLE_ACCESS_OPEN}
                        {assign var="hasArticleAccess" value=1}
                    {/if}
                    {include file="frontend/objects/galley_link.tpl" parent=$article labelledBy="article-{$article->getId()}" hasAccess=$hasArticleAccess purchaseFee=$currentJournal->getData('purchaseArticleFee') purchaseCurrency=$currentJournal->getData('currency')}
                </li>
            {/foreach}
        </ul>
    {/if}
    
  3. Add the following lines to insert an Abstract button within this block:

    <li>
        <a class="obj_galley_link" id="article-{$article->getId()}" {if $journal}href="{url journal=$journal->getPath() page="article" op="view" path=$articlePath}"{else}href="{url page="article" op="view" path=$articlePath}"{/if}>
            Abstract
        </a>
    </li>
    
  4. Save the file. Now, the Abstract button should appear alongside the other galleys such as Full Text (PDF).

This button will have the same styling as the existing galley links since it uses the class obj_galley_link.