Random video (Newsroom template)

Hello, how can we display a random video instead of the last one, in the homepage of the Newsroom template?
Writing the function to get a random (list) video isn't a problem. After that the easiest should be to replace the last video by the random one, but where should we do it?
Seems there are a few phtml files to change and so far our tries do not work...
If anybody could help?!

Comments

  • That logic is located in the controller. You would either have to 1) override the controller, 2) create a plugin, or 3) use a theme helper function. The better options are 2 & 3 as you would be safe during updates.
Sign In or Register to comment.