Global action

Hi!

I need to display some data in each page of web site. It’s some random photos and news. So I should perform the queries in each action and each controller. Should I place my code in index.php ? :unsure:

You should create a widget and call it in your layout.