[ic] Modifying [more-list] link?

Mike Heins mikeh@minivend.com
Sat, 7 Apr 2001 03:39:11 -0400

Quoting Jean-Pierre Parent (parentjp@videotron.ca):
> Heya folks,
> Does anyone ever modified the link of the [more-list] tag?
> If so would it be possible to explain me how you managed
> to do that? Basically I want to pass a form value...I guess
> i could use scratch values but what happens if the user does
> not have cookies enabled? Will he still get that value passed
> from pages to pages?
> Should I dig into the source or is it possible? 

No, but it is a good idea. If you add a one-line patch (I just put it in 4.7):

--- 3768,3774 ----
        $prefix = $q->{prefix} || '';
        my $form_arg = "mv_more_ip=1\nmv_nextpage=$page";
        $form_arg .= "\npf=$q->{prefix}" if $q->{prefix};
+       $form_arg .= "\n$opt->{form}" if $opt->{form};
        if($q->{mv_more_id}) {
                $more_id = $q->{mv_more_id};
                $form_arg .= "\nmi=$more_id";

Then you can do:

    [search-region form="testvar=1"]

Then on a results page the below should only show the if when you click
a more link:

    [if cgi testvar]
    Probably a more.
    [search-region form="testvar=1"]

Of course you can put form="testvar=[value somevar]" in the parameter
to make it come from outside, such as with a va=somevar=1 in the
search link.

Thanks for the idea!

Red Hat, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <mheins@redhat.com>

Just because something is obviously happening doesn't mean something
obvious is happening. --Larry Wall