Skip to content

Latest commit

 

History

History
66 lines (39 loc) · 2.05 KB

File metadata and controls

66 lines (39 loc) · 2.05 KB

Browse by Supplement Plugin

OJS 3.4 generic plugin for Cadernos de Saúde Pública (CSP). Adds a "Suplementos" dropdown to the journal navigation menu that automatically lists all published issues whose English title contains "Supplement", ordered most recent first.

Requirements

  • OJS 3.4.x
  • PHP 8.2+

Installation

Copy or clone this repository into the OJS plugins directory:

cd ojs/plugins/generic/
git clone <repository-url> browseBySupplement

Setup (one-time)

1. Enable the plugin

Go to Website → Plugins → Generic Plugins, find Browse by Supplement and enable it.

2. Add the menu item

Go to Website → Setup → Navigation → Primary Navigation Menu → Edit.

Click Add Item, select the type Suplementos, give it a label (e.g. "Suplementos"), and click Add Menu Item.

Drag the item to the desired position in the menu and click Save.

That's it. The dropdown is now live and fully automatic.

How it works

Once the menu item is placed, the plugin queries the database on every page load and populates the dropdown with all published issues whose English title contains the word "Supplement" (case-insensitive). Each entry is labeled v.{volume} {localized title} and links directly to the issue page.

New supplement issues appear in the dropdown automatically when published — no further configuration needed.

Filtering logic

An issue is included if:

stripos($issue->getTitle('en'), 'Supplement') !== false

The filter runs on the English title (en locale), not the display locale. This ensures consistent behavior regardless of the interface language.

Label format

Volume set Label example
Yes v.40 Suplemento 1 2024
No Suplemento 1 2024

The localized title (in the journal's primary locale) is used for display.

Customization

The keyword "Supplement" is hardcoded. To change it, edit the stripos call in BrowseBySupplementPlugin.php:

if (stripos($issue->getTitle('en') ?? '', 'Supplement') === false) {