1

I'm building a church site, and I want to create a "media" channel with a list of all the messages. On the media index page there would be a list of images, some associated with a sermon series, others with just an individual message. When you click on one of the images for a sermon series, it would go to a list page of all the sermons within that series. I'm unsure of how to code the template and the channel entry fields to make this happen?

My initial thought was just put a field in the entry where they would enter the sermon series name, but that means they'd have to enter it in the same way each time for that series, otherwise the sermon wouldn't show up under the list of sermons. Then I thought maybe there could be a drop down menu with the sermon series name in it, and the admin would just select that. Then I imagined 5 years down the road when there are hundreds of items in a drop-down menu...that's obviously not ideal.

Does anyone have any ideas on an effective way to do this? Any input you can provide would be greatly appreciated.

| improve this question | | | | |
2

One solution would be to use a relationship field for the sermon series, and then set "Allow multiple relations?" to "Yes" (Channel Fields > your field group > Field Type "Relationships").

If you leave it at a single choice then it will be a drop down list like you want to avoid, but multiple choices gives you a search box in the field. You could then either train or notate to only pick one, and you might find that having the ability to relate a sermon entry to more than one series becomes useful at some point.

[for EE versions 2.6.0+ I think]

| improve this answer | | | | |
2

I've done this sort of thing before myself using two channels - one for the media postings and one for series (the series itself being an entry can be extremely useful, since you can describe it, have its own custom fields, etc.) and then use a relationship to tie the media messages to a series if applicable. Whether you need the relationship to be one to one or one to many is something you would have to decide - one to many (or even many to many) can give you a fair bit more flexibility over time, potentially. I haven't tried this with the new relationship field in 2.6+ - I have instead done this in the past with earlier versions of EE with Playa. The benefit there is not only the many to many fieldtype but the filtering options that are available within the field type - keyword within the title, category or status are useful for the admin to filter to the right media entries. So you would place the Playa field within the custom field group for the media messages. You would just need to ensure that the series to which the media message belongs is already an entry. Then a media message, when being entered, simply gets assigned to one or more series if applicable.

| improve this answer | | | | |

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.