Staticpage plugin next and prev link titles

Creating and modifying plugins.
Post Reply
caw
Regular
Posts: 13
Joined: Wed Jul 20, 2005 5:48 am

Staticpage plugin next and prev link titles

Post by caw »

When using the navigation feature of the staticpage plugin, the "next" and "prev" links use the static page's "URL shorthand name". This is unexpected -- it should use the Headline instead.

Thanks,
Curtis.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Staticpage plugin next and prev link titles

Post by garvinhicking »

Hi!

Which version of the plugin are you using? What is displayed in the navigation can be changed via the plugin_staticpage.tpl template files...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
caw
Regular
Posts: 13
Joined: Wed Jul 20, 2005 5:48 am

Re: Staticpage plugin next and prev link titles

Post by caw »

garvinhicking wrote:Which version of the plugin are you using?
3.35 (which is the latest, as far as I know)
garvinhicking wrote:What is displayed in the navigation can be changed via the plugin_staticpage.tpl template files...
Not as far as I can tell -- there's no way to access "Next" and "Prev" information except through the Smarty variables set in the plugin. It just seems odd that the $staticpage_navigation.*.name variables use the URL shorthand name (which is marked as "for backward compatibility") instead of the Headline.

I really like the staticpage plugin, so I'm not meaning to complain -- just saying that the default behavior seems strange to me.

Thanks,
Curtis.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Staticpage plugin next and prev link titles

Post by garvinhicking »

Hi!

I understand your reasoning; I'll look into this or try to contact the current maintainer of the static page plugin (falk). I think I remember there is a way to use other variables in that place.

I'm currently a bit busy with releasing 1.0, but after that I'll look into it!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
caw
Regular
Posts: 13
Joined: Wed Jul 20, 2005 5:48 am

Post by caw »

Ok, I went through the code and found what I think should be changed. Here's a diff:

Code: Select all

839c839
<                 $top['name']      = $pages[$i]['pagetitle'];
---
>                 $top['name']      = $pages[$i]['headline'];
846c846
<                         'name' => $this->get_config('showtextorheadline') ? STATICPAGE_PREV : $pages[$i-1]['pagetitle'],
---
>                         'name' => $this->get_config('showtextorheadline') ? STATICPAGE_PREV : $pages[$i-1]['headline'],
850c850
<                         'name' => $this->get_config('showtextorheadline') ? STATICPAGE_NEXT : $pages[$i+1]['pagetitle'],
---
>                         'name' => $this->get_config('showtextorheadline') ? STATICPAGE_NEXT : $pages[$i+1]['headline'],
Thanks,
Curtis.
falk
Regular
Posts: 512
Joined: Tue Sep 27, 2005 10:16 am
Location: DD
Contact:

Post by falk »

Hello Caw,

i will include your diff in the next releas of staticpages. I am currently working on version 3.50 with new backend GUI. Thank you for using staticpages.
Post Reply