OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Making homepage title image 'clickable'

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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Making homepage title image 'clickable'

Postby davidmmorris » Mon Apr 16, 2012 12:20 am

[Apologies for reposting, the first was in the wrong forum]

I would like for visitors to be able to click on the journal header and have them return to the homepage. I have tried to identify where the call for :

<img src="http://www.ijmsonline.org/public/journals/1/homeHeaderTitleImage_en_US.jpg" width="900" height="90" style="border: 0;" alt="">

is coming from but unable to find the code or file, I guess I need that to make it click-able.

I tried a few years ago and gave up, being forced to upgrade OJS and redo the site I thought I would have another shot.

Thanks,

David.
davidmmorris
 
Posts: 5
Joined: Sun Apr 15, 2012 9:16 am

Re: Making homepage title image 'clickable'

Postby JasonNugent » Tue Apr 17, 2012 3:53 am

Hi David,

That image URL won't actually be in the code, which is probably why you couldn't find it. It's generated dynamically using a few template variables. What version of OJS are you using? In 2.3.7, the header logo code is found on line 100 of lib/pkp/templates/common/header.tpl. Keep in mind that if you modify that template, you'll need to persist that change if you ever upgrade OJS -- it will be overwritten otherwise.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 910
Joined: Tue Jan 10, 2006 6:20 am

Re: Making homepage title image 'clickable'

Postby davidmmorris » Sat Jul 14, 2012 12:30 pm

Thanks for replying, I have been trying all sorts. Yes, line 100 in the relevant header.tpl is where I have started.
Okay, I thought I could add the following line and make the headertitle clickable to home. I have tried to put it after several pieces of code but still not joy.

<a href="{$baseUrl/index.php}"><img src="{$HeaderTitle}></a>

1. Is this code likely to work?
2. Where in the section would I place it, I have left it just following the <div id="header">?

Code: Select all
<div id="header">
<div id="headerTitle">

<a href="{$baseUrl/index.php}"><img src="{$HeaderTitle}></a>

<h1>

{if $displayPageHeaderLogo && is_array($displayPageHeaderLogo)}
   <img src="{$publicFilesDir}/{$displayPageHeaderLogo.uploadName|escape:"url"}" width="{$displayPageHeaderLogo.width|escape}" height="{$displayPageHeaderLogo.height|escape}" {if $displayPageHeaderLogoAltText != ''}alt="{$displayPageHeaderLogoAltText|escape}"{else}alt="{translate key="common.pageHeaderLogo.altText"}"{/if} />
{/if}
{if $displayPageHeaderTitle && is_array($displayPageHeaderTitle)}
   <img src="{$publicFilesDir}/{$displayPageHeaderTitle.uploadName|escape:"url"}" width="{$displayPageHeaderTitle.width|escape}" height="{$displayPageHeaderTitle.height|escape}" {if $displayPageHeaderTitleAltText != ''}alt="{$displayPageHeaderTitleAltText|escape}"{else}alt="{translate key="common.pageHeader.altText"}"{/if} />
{elseif $displayPageHeaderTitle}
   {$displayPageHeaderTitle}
{elseif $alternatePageHeader}
   {$alternatePageHeader}
{elseif $siteTitle}
   {$siteTitle}
{else}
   {$applicationName}
{/if}
</h1>
</div>
</div>


Thanks for an excellent piece of software, it has served well for a few years now.
davidmmorris
 
Posts: 5
Joined: Sun Apr 15, 2012 9:16 am


Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests