Video Lesson: Pass data to a template using a ViewModel in Magento

Pass data to a template using a ViewModel in Magento

Enroll to watch this lesson

Black Friday The whole University for $299/yr.

Pass data to a template using a ViewModel in Magento

Pass data to a Magento ViewModel template using layout XML arguments and block getData integration.


Lesson Content

We’ve created a view model, but now we need to get access to that ViewModel. We’ll do that by injecting it as an argument to the block using layout XML.

Within view/frontend/layout open the blog ...

Premium content

Enroll to unlock the full content and all course materials.

Black Friday

The whole University for $299/yr.

Get the deal →
Maggie

Hey, I'm Maggie! 👋

Ask me anything.

Black Friday

The whole University for $299/yr.

Every course, Maggie & Campus. The lowest price ever.

Get the deal →
Comments

Join the discussion!

Notes

Keep track of what you learn!