Can't override navPrimaryMenu.tpl in OJS 3.2.1.1

Hello everyone,

I am developing a template with OJS 3.2.1.1 (I have already developed several templates with OJS 3.1).

I can’t override PrimaryNavMenu.tpl, in OJS 3.1 navigationMenu.tpl managed both menus, the user menu and the primary navigation menu, in the tpl file there was an “if-then-else” statement which for each menu to render ({if $ navigationMenu}).

In the new version, looking at the folder pkp and templates, I found that navigationMenu.tpl contained in /lib/pkp/templates/frontend/components/ there is no longer the “else” branch, but PrimaryNavMenu.tpl has been added in /templates/frontend/components/ which seems shape the primary navigation menu.

However, I tried to override that menu in my template but it doesn’t work and I always see the original OJS menu, on the contrary the navigationMenu.tpl overriding works as usual (I also tried to restore the else branch in that tpl but with no success).

The strangest thing is that neither if I modify PrimaryNavMenu.tpl directly on the server in the original position I don’t see any effects, it’s appear as if it were not used and the {primary} variable called in header.tpl was loaded directly from the core without using a tpl.

Does anyone have any suggestions?

Hi @nostrabramus,

Just a thought, but are filename cases causing confusion? I’m not sure if you’re developing on Windows or Linux, but primaryNavMenu.tpl starts with a lowercase p.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
that was my first doubt, but the name is correct: primaryNavMenu.tpl

I found the problem, I missed the else branch of the menu (the items without child).

Thanks for support

Regards

1 Like