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}
1
  • 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) Nov 28, 2013 at 11:39

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.