Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Links::Utils::paging() help needed

Quote Reply
Links::Utils::paging() help needed
I'm trying to use Links::Utils::paging() for page spaning in a plugin.
The problem is that $build_root_url is prepended to my urls.

ie, instead of:

http://www.perlmad.net/site/archives/2006/08/

I get

http://www.perlmad.net/site/http://www.perlmad.net/site/archives/2006/08

It looks as though the "page" parameter is supposed to be a relative URL. That would be fine, except I'd like the posiblility of defining a directory that won't necessarily reside in build_root_url.

Is there any way around this short of copying the subroutine and making the changes? I really want to avoid doing that as its several hundred lines of code and only a few lines that actually need modification.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] Links::Utils::paging() help needed In reply to
I got around the problem by doing this:

In my template I added
Code:
<%set tmp = Links::Utils::paging()%>
<%Plugins::ArchiveBuilder::paging($tmp)%>

In my plugin I added
Code:
sub paging {
my $html = shift;
$html =~ s,\Q$CFG->{build_root_url}/\E,,g;
return $html;
}

Philip
------------------
Limecat is not pleased.