1

I used code to limit each widgets area to one widget only. It works great: It uses JavaScript to do so, using the fact that the dashboard’s widgetized areas all use the jQuery UI Sortable library, and hooks into the update function in order to check, enforce, and manipulate the DOM based on whatever restrictions you’d like.

However, now in version 4.1 there is another way of inserting widgets into widget areas, that don't involve the Sortable library. Now there's the widgets-chooser that opens when clicking a widget, and you get a list of all areas into which you can insert the widget.

I'd like to disable that list, or, alternatively, hook onto its insert function and run the same kind of code that prevents multi widgets in the same area.

Your Answer

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

Browse other questions tagged or ask your own question.