I’m putting events (from an event blog) on a calendar. Some of the events are actually workshops, and they have a link to a workshop blog with the description, pre-requisites, and so forth.
If the event has a link to a workshop, I’d like to use the event title as a heading. If the event is linked to a workshop, then I’d like to use the workshop’s title.
The code I’ve written works for workshop links, but when there’s no link, it just shows ‘{title}’.
Here’s my code:
{exp:weblog:entries weblog="events" }
{!-- If this entry is linked to a workshop, then use the workshop title, description, and body instead of the event fields. --}
<h1>
{related_entries id="event_workshop_link"}
{if no_related_entries}
{title}
{/if}
{title}
{/related_entries}