2

I have a template in Site B pulling in data from a channel entries tag pulling in entries from Site A which works fine.

I now need to display the image from the entry in Site A in the Site B template along with the current text.

The image is coming from a relationship field and so my tag is like this:

{exp:channel:entries
    site="sitea"
    channel="my_channel"
    disable="categories|category_fields|member_data|pagination|trackbacks"
    dynamic="no"
    show_future_entries="yes"
    status="not Closed"
    limit="1"
    search:event_field="y"
    }
       {cf_prod_photo limit="1"}
          <img src="{cf_photos_file}" alt="blah"/>
       {/cf_prod_photo}

{/exp:channel:entries}

I should add that this code comes from Site A and pulls an image in perfectly on that site.

1

Seems to be undocumented, but I think a relationship field tag pair accepts a site parameter:

{exp:channel:entries
    site="sitea"
    channel="my_channel"
    disable="categories|category_fields|member_data|pagination|trackbacks"
    dynamic="no"
    show_future_entries="yes"
    status="not Closed"
    limit="1"
    search:event_field="y"
 }
       {cf_prod_photo limit="1" site="sitea"}
          <img src="{cf_prod_photo:cf_photos_file}" alt="blah"/>
       {/cf_prod_photo}

{/exp:channel:entries}
0

If the image is in a relationship field would you need to do?

 {cf_prod_photo limit="1"}
      <img src="{cf_prod_photo:cf_photos_file}" alt="blah"/>
 {/cf_prod_photo}
2
  • It would appear not. That doesn't work i'm afraid. – JohnWBaxter Apr 24 '16 at 16:38
  • Does it give you any output? What does template debugging tell you? When using {exp:playa tags across MSM sites I've had to also include the site= parameter. Not sure if it applys here, but worth a shot. What version of EE? – Jim Wyse Apr 25 '16 at 11:41
0

As Jim suggested does kit give any output at all?

Suggest you try stripping back the entries tag to the bare minimum and see if you can get the entry title to work, eg

{exp:channel:entries
    site="sitea"
    channel="my_channel"
    dynamic="no"
    show_future_entries="yes"
    status="not Closed"
    limit="1"
    }
       {title}

{/exp:channel:entries}

Then add bits back in to see where it breaks.

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.