[ic] Action Map - basics?

music at labyrinth.net.au music at labyrinth.net.au
Wed Aug 3 08:18:21 EDT 2005


----- Original Message ----- 
From: "Ton Verhagen" <tverhagen at alamerce.nl>
To: <interchange-users at icdevgroup.org>
Sent: Wednesday, August 03, 2005 5:19 PM
Subject: Re: [ic] Action Map - basics?


> Quoting Simon <music at labyrinth.net.au> :
>>[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?


For example, in resultsnews.html I have tried:
[search-list]

[item-data News category]<br>
[item-data News newscontent]
<br><br>
[/search-list]

I then call it with
www.domain.com/storename/news/Nails

however no content is returned and these ITL tags are simply displayed on 
the page...





More information about the interchange-users mailing list