cancel
Showing results for 
Search instead for 
Did you mean: 

Custom widget with image chooser

Custom widget with image chooser

So I've extended the default Magento 2 widgets with an Image Chooser, as suggested here https://gist.github.com/cedricblondeau/6174911fb4bba6cb4943.

 

However, I end up with {{widget type="Elephant\CustomWidget\Block\Widget\TextAndImage" title="Titel" image="{{media url="wysiwyg/photo-1432057322224-8916b9ed202a.jpeg"}}, which as you see, has a nested directive {{media}}. Magento is unable to process it and breaks it. How can I allow nested directives like this?

2 REPLIES

Re: Custom widget with image chooser

Hello Tommy

 

I have the same problem, you found a solution already?

thank you

Re: Custom widget with image chooser

I think magento2 is not able to handle this because of nested double quotes.

You might want to try using an interceptor to work around this problem.

 

http://magento.stackexchange.com/questions/131262/magento-2-widget-with-image-chooser/152172