Magento2-ViewModelExample Small example of how to use ViewModel in for blocks. Done following this tutorial. Install Place this in app/code/Niall and run bin/magento setup:upgrade How to use Shows up on the default CMS homepage, but can be placed anywhere via the layouts.