Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Template design and Front-End Code

Post Reply
 
Thread Tools
  #1  
Old 07-01-2005, 08:08 PM
skennedy1217's Avatar
skennedy1217 Offline
pp veteran
 
Join Date: May 2005
Location: Chattanooga, TN
Posts: 71
Conditional format for navigation separators

I'm using the following PP tags in my template's navigation:
Code:
<IMAGE_PREVIOUS_LINK>
<IMAGE_NEXT_LINK>
As you are browsing through the pics you usually see this in the navigation bar:

Prev | Comments | Next // Home - Blog - Archive...etc.

On the oldest and most recent posts it looks like this:

Prev | Comments | // Home - Blog - Archive...etc.
| Comments | Next // Home - Blog - Archive...etc.

I want it to look like this:

Prev | Comments // Home - Blog - Archive...etc.
Comments | Next // Home - Blog - Archive...etc.

That is, I want the extra "|" separators to disappear when there's no Prev or Next link showing. I've done this before in Textpattern, but couldn't find a tag for it in PP.
Reply With Quote
  #2  
Old 07-01-2005, 08:40 PM
Connie
Guest
 
Posts: n/a
this text is always a mixture of the template, the language-file and the code which is produced by the script

so look into your language file:

Quote:
$lang_previous = "Previous";
$lang_next = "Next";
maybe the separators are defined there?
Reply With Quote
  #3  
Old 07-01-2005, 08:46 PM
skennedy1217's Avatar
skennedy1217 Offline
pp veteran
 
Join Date: May 2005
Location: Chattanooga, TN
Posts: 71
The separators are manually placed in the template, so I think what you're saying is that I can go into the PHP and add them there.
Reply With Quote
  #4  
Old 07-01-2005, 09:35 PM
Connie
Guest
 
Posts: n/a
you should use the language-file and define the strings there:

Quote:
$lang_previous = "Previous";
$lang_next = "Next";
$lang_no_previous = "No Previous Image";
$lang_no_next = "No Next Image";
to:
Quote:
$lang_previous = "Previous |";
$lang_next = "Next |";
$lang_no_previous = "No Previous Image";
$lang_no_next = "No Next Image";
something like this, so the NEXT if existing brings the separator as well as PREVIOUS if existing

the language-file should be changed in /languages/lang-english.php for example
Reply With Quote
  #5  
Old 07-02-2005, 03:40 AM
skennedy1217's Avatar
skennedy1217 Offline
pp veteran
 
Join Date: May 2005
Location: Chattanooga, TN
Posts: 71
Thanks Connie, it worked like a charm!
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 07:34 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs