I had

{parents channel="gallery"}
    {if parents:no_results}Galleries: 0</a>{/if}
    {if count >= 1}
        {if count == total_results}
        Galleries: <a href="{site_url}models/profile/{embed:modelid}">{parents:total_results}</a>

And if 3 galleries and 2 videos, it would say Galleries 3 Videos 2

Now it says Galleries 3 Galleries 3 Galleries 3 Videos 2 Videos 2

I'm sure EE's realtionships changed...any idea what I need to change it to?


1 Answer 1


You must prefix all of the variables inside of a parents tag with parents:,including count and total_results.

You also have an extra conditional which you don't need - and, note the change in creating the link to use the {path} variable.

{parents channel="gallery"}
    {if parents:no_results}Galleries: 0{/if}
    {if parents:count == parents:total_results}
        Galleries: <a href="{path="models/profile/{embed:modelid}"}">{parents:total_results}</a>
  • Btw, how come I dont have to use the field="something" tag in the first line?
    – CJbrian
    Apr 29, 2014 at 16:11
  • Ah - well you should use the field parameter, but if you don't I think it will just grab all relationships for that entry (from all fields)? Apr 29, 2014 at 19:24

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.