OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Navigation Bar

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.

Navigation Bar

Postby ripnix » Sat Feb 24, 2007 11:33 am

How can I highlitght the current journal section w/ smarty and OJS? Let's say I'm navigating on about section or any other and I want it highligted.
I don't know if I've expressed myself well, hope i did.

Thanks for any help,
Filipe
ripnix
 
Posts: 14
Joined: Sat Jul 16, 2005 4:16 am
Location: Portugal

Postby asmecher » Sat Feb 24, 2007 7:04 pm

Hi Filipe,

This is probably best accomplished as follows: You can check the $requestedPage variable in templates/common/header.tpl to see if it is the same as the link being drawn, e.g. "user" or "about". If so, insert bold tags around the link. (I haven't tried this myself, but it should work.)

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8903
Joined: Wed Aug 10, 2005 12:56 pm

Postby ripnix » Sat Mar 03, 2007 7:52 am

asmecher wrote:Hi Filipe,

This is probably best accomplished as follows: You can check the $requestedPage variable in templates/common/header.tpl to see if it is the same as the link being drawn, e.g. "user" or "about". If so, insert bold tags around the link. (I haven't tried this myself, but it should work.)


Thanks Alec. That worked fine. Still I'm having trouble with Current and Archives. Both get highlighted I've been trying to get this workin' on my own but I didn't find out how. Any tips here?
ripnix
 
Posts: 14
Joined: Sat Jul 16, 2005 4:16 am
Location: Portugal

Postby asmecher » Sat Mar 03, 2007 10:32 am

Hi ripnix,

If $requestedPage indicates "current" or "archive", you can check to see if there's an $issue variable, and if it exists and $issue->getCurrent() is true, you're on the "Current" link.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8903
Joined: Wed Aug 10, 2005 12:56 pm

Postby ripnix » Tue Mar 20, 2007 11:43 am

asmecher wrote:Hi ripnix,
If $requestedPage indicates "current" or "archive", you can check to see if there's an $issue variable, and if it exists and $issue->getCurrent() is true, you're on the "Current" link.

Hi Alec,
for this I just used this
Code: Select all
{if $issue}
  <li {if $requestedPage == "issue"} class="current"{/if}><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>
{else}
  <li><a href="{url page="issue" op="current"}">{translate key="navigation.current"}</a></li>
  <li {if $requestedPage == "issue"} class="current"{/if}><a href="{url page="issue" op="archive"}">{translate key="navigation.archives"}</a></li>
{/if}


Heads UP! this change is done on the issue/header.tpl template.
I was changing common/header.tpl :(

Why isn't the common/header.tpl a real common->header ?, at least until we get to the article itself.

Thanks Alec.
Filipe
ripnix
 
Posts: 14
Joined: Sat Jul 16, 2005 4:16 am
Location: Portugal

Postby asmecher » Tue Mar 20, 2007 12:00 pm

Hi Filipe,

There are a few functional differences between templates/common/header.tpl and templates/issue/header.tpl; however, I agree that they should be reconciled into a single template, as there is nothing justifying a separate header template file for issues. I've added a bugzilla entry for this cleanup task; see http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=2702 for the bugzilla entry.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8903
Joined: Wed Aug 10, 2005 12:56 pm

Postby ripnix » Fri Mar 23, 2007 6:33 am

Hi Alec,
asmecher wrote:Hi Filipe,

There are a few functional differences between templates/common/header.tpl and templates/issue/header.tpl; however, I agree that they should be reconciled into a single template, as there is nothing justifying a separate header template file for issues. I've added a bugzilla entry for this cleanup task; see http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=2702 for the bugzilla entry.

Regards,
Alec Smecher
Open Journal Systems Team

That's nice. DRY is nice :)
Thanks for your support,
Filipe
ripnix
 
Posts: 14
Joined: Sat Jul 16, 2005 4:16 am
Location: Portugal


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests