0

If my client attaches 4 images to an Assets-field for an entry, how would I get a random one of those images? I was hoping something along these lines:

{exp:channel:entries channel='types'}
    {type_map_icon limit='1' orderby='random'}

    {/type_map_icon}
{/exp:channel:entries}

Where {type_map_icon} is the Assets-field which holds the 4 images. Any thoughts?

1

Sorry, my bad! Assumed orderby='random' but the parameter = sort='random'!

1
  • Probably worth emailing P&T about this, it's strange that it's inconsistent with every other EE plugin. Apr 9 '13 at 13:09

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.