I have a channel with a category group. I need the search to order results if a certain category has been selected by placing them at the top, and entries with the same category to be then ordered by date.

Is this possible using solspace search?


This isn't possible with Super Search as is. However, you could attempt to run a workaround with the Preparse add-on (free). What it allows you to do is parse other content into a new custom field (let's call it "my_category_field") from an EE template (used only for formatting/parsing the entry data) at time of publishing/updating of entry. So, you could have Preparse set to load the "my_category_field" field with the usual category tags in your Preparse template:

{exp:channel:entries entry_id="{preparse_entry_id}"}

And Preparse will parse out the category data into a your "my_category_field" field, allowing you to then have Super Search results order the results by your "my_category_field" custom field + date.

Please let me know if that makes sense! :)

  • I did consider that using the Stash plugin instead. But i favour simplicity and so decided to move it from a category to a dropdown and managed to get it working. – BillyMedia Dec 30 '14 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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