Developing New Uber Filter Widgets
Follow the guidance below and I can offer some tips through the addon support. If you need detailed help, I can quote for developing a custom filter widget for you.
The first thing to decide is whether you need to develop a new template for an existing block, or a completely new block.
New block templates
New block templates can be created in the usual concrete5 way, placing the template in your package or in the root /blocks folder.
Reasons for new block templates:
- You want to keeping the form controls and behaviour, but style the widget differently. Create a template and edit the classes and/or view.css. For example, a horizontal list of checkboxes or a custom loading overlay.
Package elements for loading Chosen or Select2 from a block view are already included with Uber Filter should you need to use them, or follow a similar pattern for loading other custom view assets.
New Uber FIlter Widget Blocks
New Uber Filter Widget blocks generally extend their controllers from the text block controller. The text block declares many utility classes and already handles validation and save logic for most common edit elements.
Some blocks extend from the other existing widgets, which in turn extend the text block. Key blocks here are the checkbox widgets.
Reasons for new blocks:
- You have additional or different block data items and consequently need sections in the edit dialog to work with the block data. For example, a map with clickable regions.
- You are creating a completely new type of widget. For example, the sticky widget or the loading overlay.
Please see the Filter Widget Documentation for details of each of the Uber Filter blocks.
Last updated: over a year ago