Muut Archive Legend
@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation
Badges
Recent posts
-
Can you implement a "random" feature?
· 9 years ago
Maybe loop over the array first, and remove specific images, then after that call |randomize filter,
-
Can you implement a "random" feature?
· 9 years ago
I have a question... to hide some of the images in the media.images how could we do it? ext. 00.jpg 01.jpg ??
-
Can you implement a "random" feature?
· 10 years ago
Use .all instead of .images
-
Can you implement a "random" feature?
· 10 years ago
Working for me in modular pages with the {% set showcase_image = page.find('/images').media.images|randomize|first %} method. The problem I'm having is only jpegs are displayed but gifs are ignored,
-
Can you implement a "random" feature?
· 10 years ago
Hmm... Nope, I could not make this work for modular page showcase template either... {% set showcase_image = page.media.images|randomize %} So what I get is, random image thing works with regular page
-
Can you implement a "random" feature?
· 10 years ago
I guess this is not possible. Oh well, I think I'll need to upload images twice. One set for the showcase using the code in the first reply and one set for the blog page using the code I quoted before
-
Can you implement a "random" feature?
· 10 years ago
I never tried the random function in a modular page, so i can't help
-
Can you implement a "random" feature?
· 10 years ago
The same syntax works on the blog template without disabling the caching though? I'd like to keep caching enabled.
-
Can you implement a "random" feature?
· 10 years ago
You could try to disable the caching in the page Advanced tab
-
Can you implement a "random" feature?
· 10 years ago
I have also tried this syntax but it does the same thing; picks a random image just at first load. {% set showcase_image = random(page.find('/images').media.images) %} ---