[ic] Return Click Bar

Jon interchange-users@icdevgroup.org
Sat Jan 18 11:03:00 2003


> > >     Well, on the site that I set the scratch variables while passing
> through
> > > landing pages, there were separate html pages for each prod_group and
> then
> > > again for each category, so we just did a "set" command at the top of
> the
> > > page.
> >
> >     Is there a column/field in a table to define the html page for IC to
> > pick it up automatically ?
>
>     I am not sure exactly what you mean, but we didn't have much
> database-driven stuff involved, the site actually has ten trillion
> interchange template pages.  We use flypage and results but everything above
> that is not database driven.  So it was easy to set variables at the top of
> the pages to set what the user had been through.  Here's an example:
>
> http://shop.sophee.com/sophee/womanLanding.html
>
> now click on the shaving link near the top.  Click on the first search
> results, the "California North" thing.  Notice that the page carried the
> women's header forward.  That was because a scratch variable got set when
> you hit the womanlanding page.
>
> Now go to:
>
> http://shop.sophee.com/sophee/menLanding.html
>
> and click on shaving there.  Click on the "california north" thing in the
> search results.  You will see that the exact same flypage (00169) now has
> the men's header.
>
>     But it was relatively easy to do because there is a physical page for
> the men's and women's landing pages.
>
> >     Oh thank you so much.  I'm been trying to figure out how to grab the
> search
> > URL for a while.  None of my searches came up with anything.  I should be
> > able to grab some split code from some where and then do some figuring.
>
>     Oh, you are in luck!!!  While I was writing that stuff above I started
> wondering how the sophee site picked up the sidenav which is obviously based
> on the presented search results.  Then I realized that I already wrote what
> you need:
>
> [if session last_search =~ /products/]
>   [seti lastsearch][data session last_search][/seti]
>   [perl]
>     my @sf;
>     my @se;
>     my $item;
>     my $cnt = 0;
>     my $tmpSearch = {};
>     my @searchstring = split(/\//,$Scratch->{lastsearch});
>     ## build list of sf and se
>     foreach $item (@searchstring) {
>       if ($item =~ /^sf=(.*)/) {
>         push @sf,$1;
>       }
>       elsif ($item =~ /^se=(.*)/) {
>         push @se,$1;
>       }
>     }
>     ## now build our hash of field/term pairs
>     foreach $item (@sf) {
>       $tmpSearch->{$item} = $se[$cnt];
>       $cnt++;
>     }
>     ## populate needed scratch values
>     $Scratch->{lastbrand} = $tmpSearch->{brand};
>     $Scratch->{lastmaincat} = $tmpSearch->{maincat};
>     $Scratch->{lastsubcat} = $tmpSearch->{subcat};
>     return;
>   [/perl]
> [/if]
>
>     I forgot that I wrote it in a way that I could post it here later, all
> you have to do is change those last 3 lines and you will be set.  In those
> bottom three lines, the $tmpSearch value would be the name of the search
> fields you are looking for and the thing on the left (the $Scratch) would be
> the name of whatever scratch variable you want the extracted values stored
> in.
>     Just put this at the top of your results page.
>

>
>     Man, I feel great now, contributing and stuff....
>

    I bet not as good as I do.  That was exactly what I was looking for.
Thank you very much. You just saved me a ton of time and educated
me a bit more.  Hopefully I'll be able to return something to the list.

By following those links to your site I better understand how you did
things and can appreciate the approach you took with it.  Very good.

Jon