Quantcast

Search exclude specific category?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Search exclude specific category?

Coleen_Astalos
Is there a way to modify the search posts to exclude posts from a specific forum category?

In looking, I think perhaps in search_page_html macro.  Something in/around this loop to check to see if the post is not from node#5514 (the category I want to NOT include in the search results)

<n.results.loop.current_node.>
     <n.search_result_row/>
</n.results.loop.current_node.> 

Does that sound reasonable?  If so, what should the If check look like and should it go outside the loop or inside the loop?
Thanks,
Coleen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Search exclude specific category?

Pedro <Nabble>
Please, try this:
<n.results.loop.current_node.>
	<n.if.not.equal value1="[n.current_node.get_app_node.id/]" value2="31">
		<then><n.search_result_row/></then>                    
	</n.if.not.equal>
</n.results.loop.current_node.>
Replace 31 with your subapp's id.
My test forum.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Search exclude specific category?

Coleen_Astalos
Thanks.  That works great.
Coleen
Loading...