Skip to content
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
@chrisfwd

Description

@chrisfwd

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"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions