0

I'm trying to pull some data from a relationship child (design) to the parent (packages), but it's simply not parsing anything.

{exp:channel:entries channel="packages" orderby="date" sort="asc" limit="3"}
    {design:title}
{/exp:channel:entries}

The above code renders nothing on the page, just white space in the source. The parent entries tag is correct, I have omitted other variables from the example.

I tried including the relationship as a tag pair:

{exp:channel:entries channel="packages" orderby="date" sort="asc" limit="3"}
    {design}
        {design:title}
    {/design}
{/exp:channel:entries}

Which renders the {design:title}{/design} preceded by a digit of which I can't figure out the significance. I don't think it's an entry ID or anything, but it seems to render in place of {design}.

Ultimately I'm trying to pull an image from the child's Channel Images field, but I can't seem to access anything.

The site is using EE 2.5.2 (old, I know).

0

I forgot that back in 2.5.2 the Relationship tag pair was {related_entries}, not the short name of the field itself.

So the correct usage in my example, if anyone needs it, is as follows:

{exp:channel:entries channel="packages" orderby="date" sort="asc" limit="3"}
    {related_entries id="design"}
        {title}
    {/related_entries}
{/exp:channel:entries}
| 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.