Our designer works in our own custom layout, located in:
/app/design/frontend/Vendor/Namespace
There we modify the default layout Magento_LayeredNavigation::view.phtml
Now we want to add a custom block to this file:
$block->something();
inside the structure of filter.phtml
We wrote a custom module (app/code/vendor/namespace) with a block and we add this information in:
app/code/vendor/namespace/view/frontend/layout/catalog_category_layered.xml
app/code/vendor/namespace/view/frontend/layout/catalog_category_view.xml
Now our question:
Is it correct that we add this new block in the custom design structure of view.phtml? - Or do we have to move the whole file (view.phtml) into the custom module ( which is bad for the designers .. cause the layout infos are mixed in several modules then! )
i now move the view.phtml to my custom module and add a static content .. works fine. A also add a new Block to the structure (without a template) .. i only want to return a value!
– Andre Bubner Aug 27 '16 at 09:57But this do not work! (Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid method)
Whats wrong?
Is there a solution ( like Magento1 ) to get all options for a given product attribute ( multiselect) in a phtml? Or is it only possible by using a block or Helper?
– Andre Bubner Aug 27 '16 at 10:35