Jump to content

Featured Replies

Posted

I am using this code in several feed block templates to show a random entry from a selection of entries:

{{shuffle($records);}}
{{$records = array_slice($records, 0, 1);}}

But it doesn’t work for Commerce feed blocks, as $packages is not an array. Anyone knows how to adopt the above code to work with these ActiveRecordIterators?

Solved by Daniel F

Go to solution

Recently Browsing 0

  • No registered users viewing this page.