Scripts and stylesAuthentication and authorization

Bridging Wordpress Widgets with Mouf

In Wordpress, a piece of HTML that can be displayed anywhere on the page (usually in the sidebar) is called a widget. In Mouf, the same concept is represented by Html elements. These are objects implementing the HtmlElementInterface.

Moufpress comes with a special Wordpress widget that can be used to display any Html element (i.e. any instance declared in Mouf and implementing the HtmlElementInterface).

Moufpress widget

Have a look at the screenshot of the widgets panel above. You can directly select a Mouf instance to be displayed from the Moufpress widget.

Note: if you want to control on which page your widget is displayed, you might want to have a look at the excellent Display Widgets Plugin.

What can I use this for?

Virtually anything!

You can decide to code your own class implementing the HtmlElementInterface. Once your class is written, do not forget to create an instance of your class in Mouf UI.

Or, you can decide to use one of the html element already developed for you. The list is huge: Evolugrid to display an ajax datagrid, BCE to display a form with direct mapping in database, a Twig template using the Twig block, etc... There are many possibilities if you take the time to scan the existing Mouf packages!

What next?

Learn more about:

Scripts and stylesAuthentication and authorization

Found a typo? Something is wrong in this documentation? Just fork and edit it!