Search multiple channels with different custom fields
I was puzzling with the native channel tag but then thought it might be better with Low Search. I have no idea if Low Search is the right way to go though.
My situation:
I have 3 channels: Articles, Instagram, Twitter.
With a checkbox an article can be a: blog, press or news item.
I have 3 pages: Blog, News, Videos.
On the pages I would like to display:
Blog page > articles(type=blog), instagram, twitter
News page > articles(type=news|press)
Video page > articles(type=news|press|blog where channel_videos_field=not_empty), instagram(there video_url=not_empty)
The thing is, I would like to limit the output of the page to 30 items.
For this question I would only like to focus on the video page.
How do I display posts from 3 different channels with ONLY videos sorted by date on one page?
In the EE docs and in the Low Search docs you can use the search: param but you cants specify to which channel you apply the search:field param.
Replies
Low 16 Dec 2014 12:52
If the two channels don't share the same fields, than that wouldn't be possible out of the box. However, you could create a custom filter to allow for this specific case.
louisk 16 Dec 2014 13:33
Thanks for the reply. Unfortunately that would go beyond my knowledge.
I think this should be basic behaviour of the native channel tag, actually.
If it supplies the ability to combine multiple channels entries in the output, and the search: param, why assume that all fields have the same name? You're not even allowed to give the same field name even though they are in different channels...
Low 16 Dec 2014 13:45
Yeah, I can understand. However, that's not how the current (native) search:field works. You could file a feature request with EllisLab. In the meantime, a custom query/filter would help. If you can't do that yourself, I could create it for you, for a fee. Contact me if you're interested in that.