[ic] mv_profile and mv_search_map

Ed LaFrance edl at newmediaems.com
Tue Jan 6 12:06:27 EST 2004


At 03:01 PM 1/6/2004 +0000, you wrote:
>Mike Heins wrote:
>
>>I think you cannot do it. A bug report was made about it long
>>ago, but the solution is not easy and I left it as is. Should someone
>>develop a strong streak of masochism and try and jump it to fix it,
>>I would welcome that.
>
>I have a masochistic streak a mile wide, but if _you_ think it's hard then 
>it's probably near impossible for perl hacker like myself :)
>
>>It wouldn't be too big a deal to develop a [hiddens] tag:
>>UserTag hiddens Interpolate 1
>>UserTag hiddens HasEndTag
>>UserTag hiddens Routine <<EOR
>>sub {
>>     my $block = shift;
>>     my @lines = grep /\S/, split /\n/, $block;
>>         my @out;
>>     for(@lines) {
>>                 s/\s+$//;
>>                 s/^\s+//;
>>                 my ($k,$v) = split /=/, $_, 2;
>>                 $v = $Tag->filter('encode_entities', $v);
>>                 push @out, qq{<input type=hidden name="$k" value="$v">};
>>     }
>>     return join "\n", @out;
>>}
>>EOR
>
>Although this would produce smaller pages before processing, the delivered 
>page would still contain all the hidden input tags that I am trying to avoid.
>
>No matter - it's not a big problem as I was just trying to crush my >40Kb 
>pages down a bit and thought that dropping 20+ lines of hidden input would 
>make a nice contribution.
>
>I had considered redoing _all_ my searches using sql query tags (it's half 
>and half the moment) as they seem to be more flexible and I assume quite a 
>bit faster too. But the only way I've found (that works) of using them is 
>to embed the query in the results page which means creating a new page for 
>every type of search. It would be nice if there was some way of returning 
>the results of a query to a standard search results page.

It's quite doable - I've done this with many catalogs. With just a bit of 
work, the foundation results page can be changed to handle SQL queries; the 
larger volume of work is changing the search forms and one-click searches 
(sidebar links) from interchange search calls to straight cgi values to be 
incorporated into the SQL, and of course writing your handler which 
evaluates the above to develop a smart SQL statement. It is worth the 
effort, however.

- Ed L.


===============================================================
New Media E.M.S.              Technology Solutions for Business
11630 Fair Oaks Blvd., #250   eCommerce | Consulting | Hosting
Fair Oaks, CA  95628          edl at newmediaems.com
(916) 961-0446                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (916) 961-0447 Fax
=============================================================== 



More information about the interchange-users mailing list