- Issue created by @marco aurelio rocca
- 🇩🇪Germany jurgenhaas Gottmadingen
That sounds like you're looking for a block condition, and that's available with this module → .
- 🇧🇷Brazil marco aurelio rocca
Hallo, Jurgenhaas,
I've been trying to use that module you mentioned, and it has its own issues... I'll soon add my problem there.In this present case, my original usecase was "can I manipulate que results of a view, so that a block showing the results of a query might not to show them all, but only those that I manipulate?" I was trying to purge some rows off the result, but I couldnt have the rebuilt list exhibited.
- 🇩🇪Germany jurgenhaas Gottmadingen
Ok, so, there are two different topics:
Controlling whether a block is being displayed, can be done with block conditions. And that's contained in the linked contrib module.
Controlling the result of an SQL query in views is something different and has nothing to do with blocks. It's about tweaking SQL to return a different result. As views only always return entities, this can be achieved by access control to entities. That topic is being discussed in 💬 Any way to apply ECA Access logic to query tags, as for Views? Active and probably already implemented in eca_access_control → .
- 🇧🇷Brazil marco aurelio rocca
Thanks again!
My tests here still stumble on something weird: will you confirm to me whether I should open this as a different issue? It follows:- create new Model, where Event = ECA Block
- you give it a name
- you struggle with your conditions and use an action like RENDER: TEXT to give this block some content
- you go to /admin/structure/block/list/{themname} and find this block and manage to make it show up in some region of the theme
- you get the block's machine name
- if your conditions are not fulfilled, you use action = UNPUBLISH CONTENT BLOCK, giving the machine name of the block
- Things work well, so that the content you want to show up ONLY when those conditions are fulfilled DO show up ONLY under those conditions.
- you get happy and start it all over AGAIN, with NEW conditions and new content,
- you end up with 2 or more new blocks, which will go through different sets of conditions and, when those are fulfilled, different contents
- PROBLEM: THEY INTERFERE WITH EACH OTHER, in such a way that it seems that THE FIRST ONE returning a "disappear!" command, from that "action = unpublish content block", makes ALL OTHER blocks UNDER that failing one to FAIL TOO, making them disappear REGARDLESS of having fulfilled their respective conditions...
Hope I got it well written, sorry if I did not...
Any glance at that?
Should I really take this into a new issue? - 🇩🇪Germany jurgenhaas Gottmadingen
This really sounds like a different issue. If you open a new one for this it would be great if you could provide a sample ECA model which demonstrates the effect so that we don't have to rebuild all of it manually, when we're trying to reproduce the problem.
- 🇧🇷Brazil marco aurelio rocca
Ok, I'll do that, thank you!
Guess this issue might be closed, since it ended up being a mess of "side-quests"... :) - 🇩🇪Germany jurgenhaas Gottmadingen
Here is the follow-up issue: 🐛 ECA Blocks interfere with one another!? Active