I am creating a list of entries from all of my multi sites in Expression Engine.

They are displayed on the main homepage and use this syntax below:

{exp:channel:entries site="site1|site2" category="18|15" dynamic="no" limit="999"}
<a title="{url_title}" href="
{exp:query sql="SELECT site_name FROM exp_sites WHERE site_id='{entry_site_id}'"}{site_name}{/exp:query}/{url_title}">

The idea is that the entries will be all entries on the sites across the board(9 in total) but they will be displayed/organised by the category only. The reason being is that some of the channels created for the entries have to be named differently according to seasonal changes in fashion etc.

What I am struggling to do is get the image from the entries via the field name which uses Pixel & Tonic's Assets addon. The field name is:{main_image{/main_image}.

What it gives me is the right url to the entry but I am struggling to find the image url for the images added into the entry via the addon field in the entry area.

Does anyone have an idea why this is happening or a better solution to my problem? I know its finding something because the field is being rendered on the front-end.

Thanks, Mark

  • What output are you currently getting for {main_image}{url}{/main_image}? – Alex Kendrick Jan 7 '14 at 15:58
  • I am getting blank so it means the tag is being rendered – M dunbavan Jan 7 '14 at 16:00
  • Everything looks OK and I even did a quick test with no problems. To eliminate the obvious: You're certain that you have the correct field name? And that this channel:entries tag pair is indeed returning results? – Alex Kendrick Jan 13 '14 at 17:23
  • yes it is because i did a test with it in another template group and template and it pulled the correct data into it. – M dunbavan Jan 13 '14 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.