This repository was archived by the owner on Nov 19, 2024. It is now read-only.
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Feedback on page: /guides/v2.4/extension-dev-guide/view-models.html #8458
Closed
Description
getViewModel()
results in null
Description:
Documentation explains to use <argument name="viewModel">
within layout.xml and then to retrieve that viewModel in the template by calling $viewModel = $block->getViewModel();
. This causes $viewModel
to be null.
Possible solutions:
Update layout.xml instructions to read name="view_model"