enriquepiatti / Magicento

PHPStorm plugin for Magento developers
115 stars 35 forks source link

[Magento2] Some overriden templates are not visible from layouts #256

Closed Koc closed 6 years ago

Koc commented 7 years ago

Extend some standard layout in my custom theme and copy block template to it.

<block class="Magento\Catalog\Block\Product\ListProduct" name="category.products.list" as="product_list" template="Magento_Catalog::product/list.phtml">

ctrl+click Magento_Catalog::product/list.phtml goes to original file - my overriden template not visible here, but Magento loads it correctly. If I write product/list.phtml - it propose multiple implementations. Not sure does multiple implementation make sense in overriden/extended layout in case that template also copied.

cesaric commented 6 years ago

Same. It appears Magicento 2 is indexing only module templates and not theme templates.

It will always looks/code hints in: module_dir/view/frontend/templates/path_to_templates

But never in: theme_dir/Namespace_Module/templates/path_to_templates

Btw, I've done the "Invalidate Caches/Restart" and "Refresh Magicento2 Indexes" countless times with no luck. Unless I'm missing something with registering a theme, this appears to be a relatively important missing feature.

enriquepiatti commented 6 years ago

This should be working with new release: v1.7.0. Please update.