How to insert output from other modules / controllers into a view

I have a view, and I want to display the data that will be generated by the modules and controllers on the page.

What is the best way to do this?

For example: if on a specific page I want to extract the latest news from the news module.

+3
source share
1 answer

There is an Action view helper here that allows you to invoke another controller action (and display markup).

I would add an action called latestNewsAction that displays the latest news panel / div / list and invokes it using the action view helper.

+3
source

Source: https://habr.com/ru/post/1710201/


All Articles