Support » Plugins » [Plugin: Section Widget] invert selection

  • Hey, fantastic plugin, thanks!

    I just wondered if there’s any plans for a switch to invert your selection, e.g. to display on all pages except the ones selected? If there’s just a couple of places you don’t want the widget, you can select all the pages except those, but then you have to remember to go to all the widgets and select any new pages that are created! Or am I missing something?

    If there’s no plans, I’ll be implementing it myself, will send you the code over…

Viewing 7 replies - 1 through 7 (of 7 total)
  • An alternative (or even better another feature) would be to have a “Widget Logic”-like option, for developers to include PHP conditional code. It’s so good being able to leave much of the choice in a client’s hands, but every now and then there’s a condition that only code can really do without making the interface too heavy.

    Again, happy to contribute code if you’ve no plans for this, just checking.

    Hi gyrus, thanks for the feedback. The biggest motivation for building this plugin is to provide an easy way for less technically-knowledgable users to build section-specific widgets (such as showing a RSS feed from a movie review sites for posts in the “Movies” category). Therefore, my top priority is to deliever a reasonably clean and easy to use interface that can address those needs. Building the functionailty you proposed into the plugin would probably make the UI more complex than it needs to be – yes I know I’m quite picky 😉 The bottom line is, I simply don’t think there is a big enough need for that to outweight to extra complexity added to the UI. I could be wrong though, so if you can think of any legimate use cases for that feel free to point it out.

    As for the Widget Logic-style conditional code, I’d strongly retain from doing because 1. it’s a potential security breach; 2. it’s far too complicated to be useful for my primary target users. More importantly, this plugin is not meant to be a replacement for Widget Logic – although I haven’t tested it personally, I believe this plugin should work with Widget Logic without any problems, so if that floats your boat, you can always use it in conjunction with Widget Logic.

    That being said, the plugin is fully open-sourced and GPL-compatible, so if you disagree with me or you have a smart idea then feel free to modify and extend the plugin. And of course, if that proves me wrong, I’ll be more than happy to merge that code into the next version of the plugin!

    Thanks again for the feedback – really appreaciate that!

    typo fail: …I’d strongly refrain from doing that because…

    Hi Godfrey, thanks for the response.

    I appreciate the point about Widget Logic – I’m just being picky myself and looking for a way of having that functionality too, but just wrapped up in one widget with your functionality, and without having another plugin!

    As for the selection inversion, in terms of legitimate use cases, I encountered one as soon as I started using it. A current client wants something in the sidebar on all pages except a couple of particular ones. As I said, I could check all pages expcept those, but it’s impractical to remember to check a page every time a new one’s added.

    To my mind this would be just an extra checkbox. Or maybe turn the hint “Display on these pages” on the Pages tab into a radio input together with the “Display on all except these pages” option.

    I’ll let you know if I find the time to implement it. And thanks again for a great plugin.

    Hi gyrus, just want to clearify my point: the inital goal is to make it easy to display “section-specific” content – i.e. stuff that appears only on certain sections. That’s why we went for the whitelist approach instead of the blacklist approach that you proposed. I believe there are cases that you would need to display a widget on all except some pages, just that I doubt if they would fall into the “section-specfic content” category. However I do agree that there could be other possible/potential uses for this plugin, so I won’t mind extending to plugin to do those things as well, as long as it’s not going to interfer with the primary functionalities.

    However, there is also something else that I wanted to point out. As you said, if you are selecting pages individually, you would have to change the widget settings everytime after adding new pages (although unlike posts, pages should be updated a lot less frequently… at least in theory). This would be a problem even if we’re using the blacklist approach. (e.g. you want to exclude all sub-pages of “Reviews”, then you’d have to change the settings everytime you added a new page under reviews…) The only solution to this problem is not to use pages selection at all if you expect your site structure to change frequently. Instead, you should categorize your pages properly and select the appropiate categories in the widget settings. The pages selection menu should be reserved for cases that you just need to select a few individual pages (e.g. display contact information just on the “About” page…).

    Godfrey, thanks for the detailed information, but the approaches you suggested don’t quite dovetail with the site I’m building. But nevermind, as you suggested, using Widget Logic as well as Section Widget is covering all eventualities now. Thanks again!

    Gyrys, I dont know if you have solved your problem, but Widget Logic can do what you want to do. Here is the explanation:

    Hope that helps.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Section Widget] invert selection’ is closed to new replies.