Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Provide detailed steps on how to create and use viewModels #5115

Closed
4 tasks
diazwatson opened this issue Aug 3, 2019 · 2 comments
Closed
4 tasks

Provide detailed steps on how to create and use viewModels #5115

diazwatson opened this issue Aug 3, 2019 · 2 comments

Comments

@diazwatson
Copy link
Contributor

New topic request

Description

In many places we encourage the use of viewModel over other techniques to inject functionality in elements, however detailed steps on how to create and use a viewModel are only found in https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html#layout_markup_add_to_elements

Questions:

  • Should we redirect readers to this page?
  • How about those who search specifically for viewModels?
  • Should we add a separated section to explain how to create and use a viewModel and then create links to this page when the word viewModel is mentioned?

Content checklist

  • The topic provides an explanation of how ____ works.
  • The topic provides steps for ____.
  • The topic contains code samples that shows ____.
  • Other (please specify)

Additional information/resources

Some examples:

@diazwatson
Copy link
Contributor Author

I am ready to create a PR with changes to fix this issue (so please assign to me if this issue is accepted), although would need DevDocs team to provide answers to these questions.

@jcalcaben
Copy link
Contributor

Issue is yours @diazwatson

Answers:

  1. Yes, we should direct people to this page from the page you listed
  2. If you have viewModel used in your topic, our search indexer should pick it up
  3. Yes, please create this section. Creating links is optional.

jeff-matthews pushed a commit that referenced this issue Aug 26, 2019
* #5115 Add ViewModels section to 2.2 dev-guide

* Grammar fixes.

* #5115 delete template url

* #5115 editorial changes view models

* #5115 add symlink to 2.3

* #5115 more editorial changes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants