Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CreativePoweredGeek/0468f8a5823ceb43110fed665d14a96d to your computer and use it in GitHub Desktop.
Save CreativePoweredGeek/0468f8a5823ceb43110fed665d14a96d to your computer and use it in GitHub Desktop.
ExpressionEngine Fluid field with a grid field with a relationship field with multiple channels
{fluid_field}
{fluid_field:grid_field}
{content}
{if '{content:relationship_field:channel_short_name}' == 'channel_a'}
{content:relationship_field}
{content:relationship_field:title}
{content:relationship_field:custom_field_a}
{/content:relationship_field}
{if:elseif '{content:relationship_field:channel_short_name}' == 'channel_b'}
{content:relationship_field}
{content:relationship_field:title}
{content:relationship_field:custom_field_b}
{/content:relationship_field}
{if:else}
{/if}
{/content}
{/fluid_field:grid_field}
{/fluid_field}
@CreativePoweredGeek
Copy link
Author

This is an ExpressionEngine template example of a Relationship field referencing multiple channels ,embeded within a Grid Field, inside a Fluid Field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment