Video Lesson: Exercise: Create a new function within a ViewModel in Magento

This is premium content

Only available to enrolled or University students.
Join today to unlock all lessons in this course.

Exercise: Create a new function within a ViewModel in Magento

Learn how to create a custom ViewModel function in Magento to dynamically display blog post count.


Lesson Content

The idea of ViewModels is to extrapolate all of the logic out of the template. The template is responsible for the presentation of data, not anything else.

Update the hard-coded post count, but ins...

Premium content

Enroll to unlock the full content and all course materials.

Maggie

Hey, I'm Maggie! 👋

Ask me anything.

Want to chat with Maggie?

Enroll in this course for AI tutor access.

Comments

Join the discussion!

Notes

Keep track of what you learn!