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...
Join the discussion!
Comments
Want to comment on this lesson?
Enroll in this course to leave comments.