2

I have an Assets field set up with multiple images selected inside a channel entry. When I try to output these images using the code below, nothing appears.

{exp:channel:entries channel="list_photos" entry_id="37" limit="1" disable="categories|pagination|member_data"}
  {photo}
    <li><a href="{photo:url}" class="gal" rel="group" title="{photo_description}"><img src="/phpthumb/phpThumb.php?src={photo:url}&w=200&h=140&zc=1&q=80" width="200" height="140" /></a></li>
  {/photo}
{/exp:channel:entries}

Can anyone identify the problem?

EE 2.5.5

Assets 2.0.5

2

Don't use the prefix when you're within the tag pair (the field_name prefix is only for when you want to access one of the field's properties outside of the tag pair):

{photo}
    <li><a href="{url}" class="gal" rel="group" title="{photo_description}"><img src="/phpthumb/phpThumb.php?src={url}&w=200&h=140&zc=1&q=80" width="200" height="140" /></a></li>
{/photo}

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.