Page 1 of 1

Staticpage plugin next and prev link titles

Posted: Thu Jun 15, 2006 5:25 pm
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.

Re: Staticpage plugin next and prev link titles

Posted: Thu Jun 15, 2006 5:33 pm
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

Re: Staticpage plugin next and prev link titles

Posted: Thu Jun 15, 2006 5:46 pm
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.

Re: Staticpage plugin next and prev link titles

Posted: Thu Jun 15, 2006 6:13 pm
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

Posted: Thu Jun 15, 2006 6:13 pm
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.

Posted: Sat Jun 17, 2006 1:56 pm
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.