1

I have a site that needs to include category names as a parameter for search results that's keywords might be the cat name.

Anyone know of a way to do this, or possibly a plugin that converts a chosen set of categories to field data automatically so I can spoof it.

Ta.

1 Answer 1

2

Check out Preparse from Solspace. It's a free extension that allows you to run a template against your entries when you save them and store the output in a field.

Low actually talked about this on his blog in the context of Low Search, but you can use the same principle for the native search module as well.

I recommend taking a look at the blog post and setting Preparse up on your site. I've done it before, and it works great.

3
  • By the way, since version 2.4, it's possible to add category info to the search index in Low Search.
    – Low
    Feb 28, 2014 at 9:21
  • Good point :) I love Low Search, and would highly recommend using that instead of the native search, if you're able to use it. Saves a lot of headaches. Feb 28, 2014 at 13:49
  • 1
    Thanks Chaps. I'd bought Low Search for another site but hadn't thought about it working in this way. Will have a tinker and buy another license if it fits the bill.
    – liamcrean
    Feb 28, 2014 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.