tiaxgame
help @graham. I can't random in array twig
tiaxgame
@graham, i want randon in array
Ex: {% set array=[1,2,3] %}
{{array|str_shuffle}}
I want output=123 or 132 or 213 or 231 or 312 or 321
I NOT want: {{random(array)}} (output= 1 or 2 or 3)
Graham
tiaxgame {{data.entries[(random(data.entries|length-1))].url }} will give you a random url from the current page of posts the whole list is not there unless you set entries_per_page="0" in the blog function
tiaxgame
@graham help, i can't random in twig as javascript