Returning results from more than one category

Post Reply
j.gresham
Posts: 50
Joined: Thu Sep 20, 2001 8:44 am

Returning results from more than one category

Post by j.gresham »

Hi

We are building a site with a similar structure to the one below, indexing the site and creating the required categories is no problem. However I would like to know if it is possible to get Webinator to return the results from more that one category at a time. For example using the structure below a user might want to return results from the Education category from within both the Briefings and Consultation sections of the site. Is it possible to do this?

Thanks in advance.


Social Policy Publications

>Briefings
>>>Education
>>>Employment
>Consultation
>>>Education
>>>Employment
>Evidence Reports
>>>Education
>>>Employment
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Returning results from more than one category

Post by mark »

Not in the stock script but you can edit the search script to do it. Assuming you're using the latest search script from the website (4.4.14):

In fpar remove the line that reads:
<sum "%s" "" $cq><$cq=$ret>
In search change:
<$scq=$cq>
to:
<$scq=>
<if $cq ne "">
<rex "\digit+" $cq>
<sum " or Catno matches '%s'" "" $ret><substr $ret 24 -1><$cq=$ret>
<if $cq ne ""><sum " and (%s) " $cq><$scq=$ret></if>
</if>
And change:
and Catno matches $$scq
to:
" $scq "
j.gresham
Posts: 50
Joined: Thu Sep 20, 2001 8:44 am

Returning results from more than one category

Post by j.gresham »

Thanks, I'll try this and let you know the results.
Post Reply