[ic] identify specific more list pages

Kevin Walsh interchange-users@icdevgroup.org
Wed Oct 2 15:25:02 2002


Paul Jordan [paul@gishnetwork.com] wrote:
> > >
> > > in pseudo code it would be:
> > >
> > > [if page first_result_set]show this[/if]
> > > or
> > > [if more_list_page == 1]show this[/if]
> > >
> > > Basically I need to show products on this page, but it also
> > needs to act as
> > > a "more information" home page for said product.
> > >
> > How about something like this:
> >
> >     [if value mv_first_match]
> >         On a subsequent page
> >     [else]
> >         On the first page
> >     [/else]
> >     [/if]
> >
> Thanks Kevin, but no. I tested and tested but I think I may have not
> explained myself good enough. But I did test your solution becuase I have
> learned that even when it *seems* like Kevin misunderstood you, you actually
> do understand, and have a greater plan with your suggestions :)
>
> Anyways guys, I have page_a.html and on it there is an general intro
> description to the product "type" AND the first set of products (using a sql
> query and more=1). The key here is I do have the first iteration of products
> immediately on page_a.html.
> 
> Now, when the user clicks on '2' (as in [previous] 1 2 3 4 [next] ) I no
> longer want to show the user the paragraph or two of the general product
> line description. When you click on '2' it just reloads page_a.html with the
> next iteration of 12 products.
> 
> I need some sort of "flag", that makes the first page iteration of results
> *different* than all subsequent more list page iterations.
> 
> Also, when the user goes back to the first page iteration of results, they
> once again see the general product description, and the products 1-12 again,
> kinda making the first selling page a sort of 'home page' for the product
> type.
> 
> In using mv_first_match, no matter what I did I could not make it variable,
> it would simply output '12' on very page, no matter if I place before or
> after the query. I don't think I can make mv_first_match variable, thus
> cannot use it for a flag.
> 
> I am trying to reduce the amounts of clicks, provide a general product line
> home page, and start the selling presentation immediately.
> 
You'll need to add the code into the [query] tag body for the
mv_first_match value to be useful.  I'd suggest an [on-match] section.

You should find that the mv_first_match value is set as follows:

    First page
        Value us not set.

    Subsequent page (following a [more] link).
        Value is set to a non-zero value, depending upon the page
        number and the number of SQL results shown on each page.

    Back to first page (following a [more] link).
        Value is zero.

    Back to the first page (following direct page link).
        Value is not set.

Perhaps it's the 'value is not set' part that's causing problems.
Try the following instead:

    [if explicit]
    [condition]
        my $s = $Search->{''};
        return 1 if $s->{more_in_progress} && $s->{mv_first_match};
        undef;
    [/condition]
        Now on a subsequent page.
    [else]
        Now on the first page.
    [/else]
    [/if]

Again, you'll need the code in an [on-match] section.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/