0

I am trying to create a custom module with a block that should get the values of variables in view.xml. How can I do this?

0

For better understanding please have a look this view

https://github.com/magento/magento2/blob/2.4.0/app/code/Magento/Catalog/etc/view.xml

with the following implementation

https://github.com/magento/magento2/blob/2.4.0/app/code/Magento/Catalog/Model/Product/Image/ParamsBuilder.php#L173

0

I found the answer here. It provides all the needed steps you do to get the variable values in view.xml https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/themes/theme-images.html#view_xml_vars

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.