- Issue created by @brad.bulger
- πΊπΈUnited States brad.bulger
Why do you think this is a support request and not a feature request? Sure seems to me like what I'm describing would be new functionality. Is there some way to do this with the existing system?
- π©πͺGermany Anybody Porta Westfalica
Based on π¬ Excluded forms Active someone could write a radio select to invert the setting from exclude to include, like on other places in Drupal.
Until that I think exclusion makes more sense in 95% of all cases. Happy to review MR. - πΊπΈUnited States brad.bulger
I've pushed some changes to the issue fork, do you want to review it there or as a merge request? I have not written tests for it yet.
- πΊπΈUnited States brad.bulger
I don't see the advantage. All this is doing is surfacing what was actually being done in the code, as far as only looking at form IDs that match those patterns (sort of - it would have matched on any form ID containing "user_", I changed it to match form IDs that start with "user_").
Being able to say "Match all of these except this one and this one" seems like a useful thing to be able to do.
- π©πͺGermany Anybody Porta Westfalica
Okay, please then document, that it works like this, so the negative lists wins over the positive. And please add tests showing it works like this.
With the other option, this possible conflict wouldn't exist. It''s just how Drupal solved this typically, but I also see the benefits you mentioned. - πΊπΈUnited States brad.bulger
We could also copy the way that Block Exclude Pages β does it:
Basic example where a wildcard is used to display the block on pages under the user path:
/user/* <-- this will make the block visible on all pages under the path.
But let's say you want to exclude a specific page or another path directory under the path "/user/?":
!/user/jc <-- now you will be able to specifically exclude the "jc" page
or/and:
!/user/jc/* <-- exclude on all pages under "jc/?"
That changes what's there now, we'd have to convert any excluded form IDs.
- π©πͺGermany Anybody Porta Westfalica
Yeah condition plugins are great for such things and another nice Drupal standard. We could also pick other condition plugins that make sense here.
https://git.drupalcode.org/project/block_exclude_pages/-/blob/2.1.x/src/...