I’m writing this post with a clear sense of pride about having chosen CSS selectors as “configuration syntax” for Widget Voodoo. The power and flexibility of the approach over other other, more limitting approaches is amazing.
Thank to this power, it was a “piece of cake” to resolve a help request on how to collapse al widgets at oncel I’ve got recently.
The simplicity of accomplishing this is unequaled:
Make “Auto-collapsed Widgets Selector” the same as “Widget Selector”.
For example, if “Widget Selector” is set to “.widget”, you simply set “Auto-collapsed Widgets Selector” to “.widget”, too.
Isn’t it perfectly logical? It is almost like a simple math equation:
Auto-collapsed Widgets = Widgets.
The simplicity of this can hardly be beaten, right?
There’s extra sugar for those of you with 2 sidebars: To auto-collapse all widgets in sidebar-1 (sidebar-1 being its id): Make “Auto-collapsed Widgets Selector” the same as “Widget Selector”, prefixed by “#sidebar-1 “. Example: “#sidebar-1 .widget”.
Collapsing text widgets in the 2nd sidebar only? Here you go: “#sidebar-2 .textwidget”.
And I could go cheerfully spinning like this forever… 🙂