Nav menu items per journal OJS 3.0.2

I experienced several times that in institutions which publish many journals editorial boards often would like to have navigation menu defined differently for each journal.
Is there any way to manage that since if I see well it is possible to make changes system wise but not per journal. Well, it might be possible to create child theme etc…
Will navigation menu manager allow user to create navigation menus on a per journal basis?

Thanks

You can do it already with custom child themes (we use them in journal.fi), but beginning from 3.1 OJS will have this: https://github.com/pkp/pkp-lib/issues/2178 :slight_smile:

Hello,

Can you share primarynavmenu.tpl so I can check how you created menus/submenus there?

Thanks

As an example I added a new top level menu item leading to the url https://forum.pkp.sfu.ca/ and a submenu item leading to a static page created with the static page plugin. This template would go the the child menu folder of the right journal.

{**
 * templates/frontend/components/primaryNavMenu.tpl
 *
 * Copyright (c) 2014-2017 Simon Fraser University
 * Copyright (c) 2003-2017 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * Primary navigation menu list for OJS
 *}
<ul id="navigationPrimary" class="pkp_navigation_primary pkp_nav_list">

	{if $enableAnnouncements}
		<li>
			<a href="{url router=$smarty.const.ROUTE_PAGE page="announcement"}">
				{translate key="announcement.announcements"}
			</a>
		</li>
	{/if}

	{if $currentJournal}

		{if $currentJournal->getSetting('publishingMode') != $smarty.const.PUBLISHING_MODE_NONE}
			<li>
				<a href="{url router=$smarty.const.ROUTE_PAGE page="issue" op="current"}">
					{translate key="navigation.current"}
				</a>
			</li>
			<li>
				<a href="{url router=$smarty.const.ROUTE_PAGE page="issue" op="archive"}">
					{translate key="navigation.archives"}
				</a>
			</li>
		{/if}

		<li>
			<a href="{url router=$smarty.const.ROUTE_PAGE page="about"}">
				{translate key="navigation.about"}
			</a>
			<ul>
				<li>
					<a href="{url router=$smarty.const.ROUTE_PAGE page="custompage"}">
						Custom static page
					</a>
				</li>
				<li>
					<a href="{url router=$smarty.const.ROUTE_PAGE page="about"}">
						{translate key="about.aboutContext"}
					</a>
				</li>
				{if $currentJournal->getLocalizedSetting('masthead')}
					<li>
						<a href="{url router=$smarty.const.ROUTE_PAGE page="about" op="editorialTeam"}">
							{translate key="about.editorialTeam"}
						</a>
					</li>
				{/if}
				<li>
					<a href="{url router=$smarty.const.ROUTE_PAGE page="about" op="submissions"}">
						{translate key="about.submissions"}
					</a>
				</li>
				{if $currentJournal->getSetting('mailingAddress') || $currentJournal->getSetting('contactName')}
					<li>
						<a href="{url router=$smarty.const.ROUTE_PAGE page="about" op="contact"}">
							{translate key="about.contact"}
						</a>
					</li>
				{/if}
			</ul>
		</li>
		<li>
			<a href="https://forum.pkp.sfu.ca/">
				PKP Forum
			</a>
		</li>

	{/if}
</ul>
1 Like

I have had cases in which I added different static pages in top nav menu bar.
www.thermal-science.tech/journal
I did not have the case to add submenu with static page to menu About the Journal.

Do you have examples of that?

Thanks in advance

So you need a custom page link in the top nav?

You just move this section:

				<li>
					<a href="{url router=$smarty.const.ROUTE_PAGE page="custompage"}">
						Custom static page
					</a>
				</li>

Right after this:

  <li>
  	<a href="https://forum.pkp.sfu.ca/">
  		PKP Forum
  	</a>
  </li>

Or maybe I did not understand you correctly? The navigation is really just a simple unordered list.

Hello, That is fine if there is only one journal on OJS installation. If there are more journals then menu is present in all journals. I need journal specific menu.

Thanks

As I mentioned above, for that you need to have a child theme for each individual journal that needs a custom navigation. When each journal has an own child theme, you can add the modified navigation template there. That is how I do it in journal.fi.

edit: see https://pkp.gitbooks.io/pkp-theming-guide/en/child-themes.html

Yes, I understand what you say. I created menu for static page which will be present in each journal. Editorial Board will wait for new version of OJS and use navigation menu manager.

Thanks a lot on sharing your experience.

Yes, I will also update our themes to use the new feature when 3.1 is released. Definitely a better option for both us and the journal editors.

I am not system administrator for that journal. They hired me. but, I Noticed that their technical guys are far from being ready to maintain very customized OJS installations and manage updates accordingly.
Thus, it is better for them to wait for release that will manage that easily. if otherwise, they can easily get lost in updates, customizations etc.

Thanks a lot :slight_smile:

As you did to bring up the menu. Please help me.
Sorry I speak spanish.

Which version of OJS you use right now?