[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Action Map - basics?


Quoting Simon <suppressed> :
[snip]
I am hoping to be able to display news items using URLs as follows:

www.domain.com/storename/news/Hammers
or
www.domain.com/storename/news/Nails

My ActionMap (added to catalog.cfg) looks like:

ActionMap  news  <<EOR
sub {
       my ($action, $category) = split ('/', shift);
       $CGI->{mv_todo} ='search';
       $CGI->{mv_nextpage} = 'resultsnews';
       $CGI->{mv_search_file} = 'News';
       $CGI->{mv_searchtype} = 'db';
       $CGI->{mv_coordinate} = 'yes';
       $CGI->{mv_return_fields} = 'code';
       $CGI->{mv_matchlimit} = '10';
       $CGI->{mv_sort_field} = 'category';
       $CGI->{mv_sort_option} = 'f,n';
       $CGI->{mv_search_field} = 'category';
       $CGI->{mv_searchspec} = "$category";
       $CGI->{banner_text} = "$category";
       $Tag->update('process');
       return 1;
}
EOR

I am stuck trying to get anything to show up in the resultsnews page.

Can someone please advise what loop or list code I need to add to the resultsnews.html page to pull in the news items for selected categories and the correct tag to pull in data from the news table fields?


I have implemented similar but more complex things as you
described above. For this I simply use a [search-list] construct
and [item-param ...] tags on the results pages.

What ITL are you using on your  resultsnews page?

Have a look at mv_return_fields also...


Best regards,

Ton

--
Alamerce Nederland --- Cornerstone of eBusiness
Phone +31-40-2374381    suppressed    http://www.alamerce.nl

eCommerce Solutions -- Consulting -- Website & Interchange Hosting

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.