0

I've made a view that pulls together results from two different content types - "blog posts" and "resources." This resources content type also has a field to further break down resource type (white paper, webinar, case study, etc.)

The problem: There are far more blog posts than resources. So resources get buried, several pages deep in results. How can I ensure that there's a better mix. I considered adding a weight field and grouping by it, but that doesn't seem like it would solve the problem so well. I don't want one weighted over the other. Just a better mix of the newest content, to always include those more rare resources.

I want each results page to show at least one latest 'white paper' resource, one latest 'case study' resource, one latest blog post, etcetera. Something that breaks up blog posts so they don't overpower other needed content.

Or maybe there's a way to force 'for every 2 blog posts, show a resource' ... anything that organically gets results to appear. I can't/don't want to do this manually.

Maybe something 'groupwise' but I'm not sure where/how to accomplish that.

0

AFAIK you'll have to manually modify the query to get such advanced conditional sorting.

You could group by the type (under Format), and set the Pager to such a high number that you can always be sure there will be at least one Resource there, so the second group will appear for it. But it's not a very reliable method if you can't predict the longest range of blog entries without Resources.

Usually, this is handled by creating two Views displays, one for blog entries, and the other for resources. You can set the Resources one to be Attachment type, and attach it to the blog one so they display one below the other. In that case you will be able to override the number of items in the Pager to show less Resources than Blog entries, to show Blog entries are more frequent.

  • I think my challenge in breaking them apart is that I have an exposed filter on the top of the results, to refine results. Client doesn't want things separated, or two search fields. Dang. I'll have to think on this before changing approach – turpentyne Sep 3 at 21:37
  • Attachment Display type has the option Inherit exposed filters (Should this display inherit its exposed filter values from the parent display to which it is attached?) which you can set to Yes so that takes care of your exposed filters form ;) Keep all the settings the same between your original Display and the Attachment Display (Duplicate the original as Attachment), only override content type and pager, and set the Attachment properties. – prkos Sep 3 at 22:03

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.