Вопрос

I'm trying to use one grid for multiple ResourceModels, so far I've got one grid working fine.

I can load the grid up fine using http:{}/admin/grid/grid/ enter image description here

However when i create a new route to load the same controller: http:{}/admin/grid2/grid/ . I get no main block content enter image description here

enter image description here

Here's my component UI based grid setup: Works fine for route /admin/grid/grid.

enter image description here

Does anyone know if i need to duplicate some files/directories to get grid2 to show?

Это было полезно?

Решение

You need to create grid2_grid_index.xml file under layout same as grid_grid_index.xml

Другие советы

You have to copy only layout file, due to 'grid2' route already mentioned in routes.xml.

You need to create only grid2_grid_index.xml.
copy grid_grid_index.xml to grid2_grid_index.xml you can call same ui_component file in that layout.xml file.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top