Selection rules for panes are nice but limited. Imagine what would happen if Panels exposed its panes to the Rules module!
Basic functionality I can think of:
Events:
-- A Panel is being viewed (all variants) (provides: Panel, all Panel's Variants)
-- A Variant is being viewed (provides: Variants, all Variant's Panes)
Conditions:
-- A Pane has content (params: Pane)
Actions:
-- Exclude a Pane from display (params: Pane)
-- Include a Pane in display (params: Pane) (*)
* To include a Pane in the display via Rules, Panels must first enable to "exclude from display" as a default in its UI. I suggest that having a "visible"/"invisible" initial mode, and adding the above items to Rules integration, could completely replace the "Visibility Rules" mechanism with a stronger, more flexible engine.
How about?
Comments
Comment #1
Letharion commentedMerlin, what do you think? It sounds useful, and I could look at writing the rules integration.
@valante Don't expect it to happen anytime soon though :)
Comment #2
valante commentedJust a thought for a brighter future :-)
Thanks for considering!
Comment #3
matglas86 commentedHow about the other way round? Not rules changing the panel but variants reacting on rules. I was looking for something like that today.
I hoped that I could make a variant respond to a context condition that is setup by the Context module. Something like if this page meets the condition of this context use this variant. But that could also be done by having a rule from the Rules module meet a condition and set trigger a variant.
Comment #4
simon_s commentedRules / Panels integration (in both ways) would be so ultra powerful...
Comment #5
kopeboyAny updates?!
I would like to be able to place a pane in a panel with Rules.
This is very common scenario and I was surprised there is still nothing good to do this.
Example: I have a newspaper issue which contains articles. The editors can add and rearrange the articles in the issue with Panels IPE (in-place editor).
The problem is that the articles are not there individually. And placing them one by one is both consuming and not user friendly (they have to select title or nid among all the site's nodes..).
You could just say that any (entity) referenced article is placed as an existing node in the issue panel when it's created..
I am able to sponsor this development..
Comment #6
wizonesolutionsI'm looking for something like this too. Ideally, I would be able to use a Rules condition set component and then have that be the basis for variant selection. I can see that the challenge would probably be properly passing data to the condition set...but I think I might try to do something like this and simply have it only pass the user context...either that or come up with some pattern for the arguments the condition set accepts and pass all of the Panels contexts in order.
....oh. Rules Bonus Pack seems to do this. I might submit that part as a separate module if I wind up having to fix it.
Comment #7
delacosta456 commentedhi wizonesolutions
Please can you explain/describe more about Rules Bonus Pack ?
Thanks
Comment #8
wizonesolutions@delacosta456
https://www.drupal.org/project/rb