OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Header Template help

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Header Template help

Postby mika9 » Fri Sep 01, 2006 1:39 am

Hello,

I modified the templates/common/header.tpl to move the navbar(menu) to the top - above header. Now the page shows as I want it except for the "current " link (i.e /issue/current). Only on this page the menu moves below the header. Please tell me what page must I change to show the menu on top. Here's below the modified header.tpl

Thanks
Mika

{**
* header.tpl
*
* Copyright (c) 2003-2006 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Common site header.
*
* $Id: header.tpl,v 1.42 2006/07/10 19:02:29 mj Exp $
*}

{if !$pageTitleTranslated}{translate|assign:"pageTitleTranslated" key=$pageTitle}{/if}
{if $pageCrumbTitle}{translate|assign:"pageCrumbTitleTranslated" key=$pageCrumbTitle}{elseif !$pageCrumbTitleTranslated}{assign var="pageCrumbTitleTranslated" value=$pageTitleTranslated}{/if}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$defaultCharset}" />
<title>{$pageTitleTranslated}</title>
<meta name="description" content="{$metaSearchDescription}" />
<meta name="keywords" content="{$metaSearchKeywords}" />
{$metaCustomHeaders}
<link rel="stylesheet" href="{$baseUrl}/styles/common.css" type="text/css" />
{foreach from=$stylesheets item=cssUrl}
<link rel="stylesheet" href="{$cssUrl}" type="text/css" />
{/foreach}
<script type="text/javascript" src="{$baseUrl}/js/general.js"></script>
{$additionalHeadData}
</head>
<body>
<div id="container">
<div id="navbar">
<ul class="menu">
<li><a href="{url page="index"}">{translate key="navigation.home"}</a></li>
<li><a href="{url page="about"}">{translate key="navigation.about"}</a></li>
{if $isUserLoggedIn}
<li><a href="{url page="user"}">{translate key="navigation.userHome"}</a></li>
{else}
<li><a href="{url page="login"}">{translate key="navigation.login"}</a></li>
<li><a href="{url page="user" op="register"}">{translate key="navigation.register"}</a></li>
{/if}
<li><a href="{url page="search"}">{translate key="navigation.search"}</a></li>
{if $currentJournal}
<li><a href="{url page="issue" op="current"}">{translate key="navigation.current"}</a></li>
<li><a href="{url page="issue" op="archive"}">{translate key="navigation.archives"}</a></li>
{if $enableAnnouncements}
<li><a href="{url page="announcement"}">{translate key="announcement.announcements"}</a></li>
{/if}
{call_hook name="Templates::Common::Header::Navbar::CurrentJournal"}
{/if}
{foreach from=$navMenuItems item=navItem}
<li><a href="{if $navItem.isAbsolute}{$navItem.url|escape}{else}{$navItem.url|escape}{/if}">{if $navItem.isLiteral}{$navItem.name|escape}{else}{translate key=$navItem.name}{/if}</a></li>
{/foreach}
</ul>
</div>

<div id="header">
<div id="headerTitle">
<h1>
{if $displayPageHeaderLogo}
<img src="{$publicFilesDir}/{$displayPageHeaderLogo.uploadName|escape:"url"}" width="{$displayPageHeaderLogo.width}" height="{$displayPageHeaderLogo.height}" border="0" alt="" />
{/if}
{if $displayPageHeaderTitle && is_array($displayPageHeaderTitle)}
<img src="{$publicFilesDir}/{$displayPageHeaderTitle.uploadName|escape:"url"}" width="{$displayPageHeaderTitle.width}" height="{$displayPageHeaderTitle.height}" border="0" alt="" />
{elseif $displayPageHeaderTitle}
{$displayPageHeaderTitle}
{elseif $alternatePageHeader}
{$alternatePageHeader}
{elseif $siteTitle}
{$siteTitle}
{else}
{translate key="common.openJournalSystems"}
{/if}
</h1>
</div>
</div>

<div id="body">

{display_template template="common/sidebar.tpl" hookname="Templates::Common::Header::sidebar"}

<div id="main" >


<div id="breadcrumb">
<a href="{url page="index"}">{translate key="navigation.home"}</a> &gt;
{foreach from=$pageHierarchy item=hierarchyLink}
<a href="{$hierarchyLink[0]}" class="hierarchyLink">{if not $hierarchyLink[2]}{translate key=$hierarchyLink[1]}{else}{$hierarchyLink[1]}{/if}</a> &gt;
{/foreach}
<a href="{$currentUrl}" class="current">{$pageCrumbTitleTranslated}</a>
</div>

<h2>{$pageTitleTranslated}</h2>

<div id="content">
mika9
 
Posts: 3
Joined: Tue Aug 29, 2006 8:49 pm

Postby asmecher » Sat Sep 02, 2006 12:03 am

Hi Mika,

Are you familiar with the Unix "diff" tool? I'd suggest using this to generate a diff file describing the differences between your modified file and the original; then double-check each line for typos. If the "current" link has jumped out of place, it may be due to an HTML typo.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8574
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 10 guests