0

I have a grid field (EE 2.7.2), within which is a relationship field. I want to output the categories associated with the related item within the grid field. Is this possible? I thought this might work, but it might be a step too far, tag-nesting wise:

{organisation}                                     
    {organisation:related_organisation:title} {!-- outputs related entry title, yay! --}

    {!-- this doesn't output anything --}
    {organisation:related_organisation:categories}
        {category_id}
    {/organisation:related_organisation:categories}                                                                         
{/organisation}
  • Perhaps I need to unpack the above: organisation is a grid field; related_organisation is a relationship field within that grid where the editor can select an organisation from a list of entries. I want to grab the categories associated with that organisation entry (if possible) – BellamyStudio Nov 28 '13 at 11:39
2

Try this:

{organisation}                                     
    {organisation:related_organisation:title}
    {organisation:related_organisation:categories}
        {organisation:related_organisation:category_id}
    {/organisation:related_organisation:categories}                                                                         
{/organisation}

Note the change, from:

{category_id}

to:

{organisation:related_organisation:category_id}

You must remember to reference the parents when nesting.

| 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.