[SOLVED] Is it possible to Search within a News module Category?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
heffegg
Forum Members
Forum Members
Posts: 43
Joined: Sat Mar 08, 2008 2:10 am

[SOLVED] Is it possible to Search within a News module Category?

Post by heffegg »

Hi I have a client who wants to search within News module and limit the search to a selected category.
They don't want results found on pages outside of the news category found / displayed.
Is this possible?

If yes can someone provide me with an example of the tag or code to try this.
Thank you.
Last edited by heffegg on Mon Aug 02, 2010 3:14 am, edited 1 time in total.
User avatar
pukka
Forum Members
Forum Members
Posts: 119
Joined: Thu Nov 12, 2009 6:02 pm

Re: Is it possible to Search within a News module Category?

Post by pukka »

The following code will search and show results from only the News module.

{search modules="News" resultpage="search-results"}

You can of course name your results page something else.


This following might also be of assistance:

http://forum.cmsmadesimple.org/index.ph ... 167.0.html

http://forum.cmsmadesimple.org/index.ph ... .msg184583
Last edited by pukka on Sat Jul 31, 2010 1:43 am, edited 1 time in total.
Peace & Love

--------------------------------------------------------------------------
Useful stuff: {$entry->fields|@print_r}

web design london
steph_30
Forum Members
Forum Members
Posts: 22
Joined: Mon Apr 28, 2008 11:38 pm
Location: France

Re: [SOLVED] Is it possible to Search within a News module Category?

Post by steph_30 »

Hello,

Sorry to "re open" this topic, but I can't find any answer to my question.

I need to start a search on the page's content  and the news.

How can I do that (ie what is the name of the module for the content) ?

I tried :
{search modules="News, Contents" resultpage="myPage"}

but it doesn't work.


(I'm using CMSMS 1.6.7 for the site)

Thanks a lot for answer
heffegg
Forum Members
Forum Members
Posts: 43
Joined: Sat Mar 08, 2008 2:10 am

Re: [SOLVED] Is it possible to Search within a News module Category?

Post by heffegg »

The  {search} tag will search both page content and the news module - all categories.

My problem was the client didn't want results from "page content" to show  :)
Post Reply

Return to “Modules/Add-Ons”