04.07.2019 Views

frontend-developer-1

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Customize the Look and Feel of Specific Magento Pages<br />

<br />

<br />

<br />

Each widget must implement \Magento\Widget\Block\BlockInterface.<br />

Many widgets extend \Magento\Framework\View\Element\Template. In<br />

your widget’s block, you can set up the template or execute any custom code for<br />

that widget.<br />

Widgets can be used anywhere that the content is filtered by a template filter. This<br />

includes:<br />

• CMS pages<br />

• CMS static blocks (beware of recursion)<br />

• Email templates<br />

Content widgets (as created in Content > Widgets):<br />

Widgets allow you to inject a CMS block into a location in layout XML configuration.<br />

This is a great option for content managers adding promotional material to the<br />

website. You can select from a number of different layout handles and then choose<br />

a container in which to inject the CMS block.<br />

How can a custom widget target be created?<br />

New targets can be created to facilitate widgets being injected into. Do this with the<br />

tag found inside the configuration:<br />

Copyright © 2018, SwiftOtter, Inc.<br />

132

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!