Making currentpage available in staticpage-plugin
Posted: Wed Jan 23, 2008 6:04 pm
Hi there s9y-community ...
I am using the static-page plugin, and don't want to use the available navigation-feature. I was only looking for template-variables that contain the headline and permalink for the current page I am on, and either I failed to find them or they just aren't there
...
So I added the following little hack to /plugins/serendipity_event_staticpage/serendipity_event_staticpage.php
FIND
BEFORE, ADD
Given that I haven't done any mistake(atleast it works on my site), this modification should add the following two variables that can be used within the template:
If anyone finds this code-snippet useful, let me know
Cheers,
Manfred.
I am using the static-page plugin, and don't want to use the available navigation-feature. I was only looking for template-variables that contain the headline and permalink for the current page I am on, and either I failed to find them or they just aren't there
So I added the following little hack to /plugins/serendipity_event_staticpage/serendipity_event_staticpage.php
FIND
Code: Select all
'prev' => array(
'name' => $this->get_config('showtextorheadline') ? STATICPAGE_PREV : $pages[$i-1]['pagetitle'],
'link' => $pages[$i-1]['permalink']
),
Code: Select all
'current' => array(
'headline' => $pages[$i]['headline'],
'link' => $pages[$i]['permalink']
),
- $staticpage_navigation.current.link = the link to the current static page
- $staticpage_navigation.current.headline = the headline of the current static page
If anyone finds this code-snippet useful, let me know
Cheers,
Manfred.