ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Relating a Reversed Entry? - Bug?

January 16, 2011 6:39pm

Subscribe [2]
  • #1 / Jan 16, 2011 6:39pm

    11Media

    157 posts

    EE 2.1.3

    Hi,

    I’m trying to pull a company logo within a reverse related entry to the parent entry (So in a way i’m refering back to the original chanel entry) - but it keep sthrowing up an error:

    For example:

    I have a channel called “company” which keeps all the company information such as a title logo etc… and then I have another channel called “cars” which has a related entry called “car-company” within cars which relates/links to the “company” channel…works fine… my trouble now is.. using reverse related entries to pull “Car” data from within the “Company” enry loop - but on some instances needing to refer back to the “company” to pull the logo… - it’s a tricky one to expalin but here’s the code:

    {exp:channel:entries channel="company" limit="50"}
    {reverse_related_entries channel="car"} 
    
    {title}
    {if car-image}
        {exp:imgsizer:size src="{car-image}" width="80" height="80" remote="on"}
            {sized}
        {/exp:imgsizer:size}
    {if:else}
        {related_entries id="car-company"}
            {exp:imgsizer:size src="{company-logo}" width="80" height="80"}
                {sized}
            {/exp:imgsizer:size}    
        {/related_entries}
    {/if}
    
    {/exp:channel:entries}
    {/reverse_related_entries}

    So what this is saying is… If there is an image for the “car” - show that, if not… show the Company Logo - but because it’s within a related entry - it’s having trouble refering back to the “company logo”..

    In fact the actual error i’m getting for all those images is:

    {REL[car-company]TQVhrVkZREL}

    Hope someone can assist.

  • #2 / Jan 17, 2011 9:41am

    Sue Crocker

    26054 posts

    Is there a way of doing this outside of a related entry inside a reverse related entry? I suspect that’s where the issue is.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases