0

I have one channel for workshops and one for events. each workshop can have multiple events but each event can only belong to one workshop. workshops are rarely added/edited. but new events are added frequently.

so my set-up is as follows:

workshops
    title                           Text Input
    description                     Text Area

events
    title                           Text Input
    date-and-time                   Date
    belongs-to-workshop             Relationship (to workshops, single)

now I have a template where I want to show all workshops and under each workshop I want to list related events. one easy way (so far) seems to be another field in the workshops channel: some field like "related events" (a mulitple-relationship pointing to events channel). but that means the admin would have to edit the workshop entry each time they add a new event. I'd like to make it easy on the user and just let them add events and link the event to a workshop by using the "belongs-to-workshop" drop down.

question: how could I access the events in my 'workshops' template which looks like this:

{exp:channel:entries channel="workshops"}
<div class="workshop">
    {title}, {description}
    Related Events: {???}
</div>
{/exp:channel:entries}

does the "workshop" entry not know which events are related? I suppose that's what the old "reverse related entries" tag was for?

any help appreciated.

0

See documentation here

{exp:channel:entries channel="workshops"}
  {parents field="relationship_field"}
    {parents:title} - {parents:field1} - {parents:field2}
  {/parents}
{/exp:channel:entries}
2
  • that doesn't work because workshops is the parent and there is no relationship field in "workshops" - it is in the "events" channel. I'm still hoping to somehow load events into workshop template without needing a relationship field in workshops. – P.. Sep 2 '13 at 16:20
  • Uhm. this does work... I guess I got confused by addressing "events" as {parents} when I'm thinking of one workshop being able to have multiple events (children) but each event can only have one workshop (parent?). – P.. Sep 2 '13 at 16:54

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.