2

I have a page with a path like www.example.com/newsroom. On this page nodes are displayed with help of 2 different views:

  1. View 1 : contains voted nodes by user.

  2. View 2 : contains not voted nodes by user.

The 2 views are content panes and www.example.com/newsroom is a panel page. So there is no difference in the path of both views, and the user can see both views together.

I am using the Rules module to perform some action when vote is cast on any of node. And using Rules one can check the path from where a user performs an action on a node, simply by using the token [site:current-page:url]. But in my case that is www.example.com/newsroom (no matter where the vote is related to).

Is there any way that I can differentiate if a node on that page is voted from via View 1 or View 2? As [site:current-page:url] returns path www.example.com/newsroom ... Based on which view it is, I want Rules to perform different actions. So how to check in Rules if the node being voted on is from View 1 or View 2?

I do have different classes of both views, but I'm not sure how to check those with Rules.

Any suggestions?

1
  • 1
    I've tried to further enhance (condense) you question, mostly by removing duplicate stuff in it. Please review/double check it (again), to make sure I didn't make any mistakes or cleaned it up too much. Where needed edit your question again. I think you should also add the tag "7" to it. PS: I doubt it'll get any more close votes now ... Hopefully some extra upvotes ... I find it a very interesting question (= challenge)! Dec 8, 2015 at 9:49

1 Answer 1

2

Have a look at the Rules panes module. Some details about it (from its project page):

Rules Panes allow embedding Rules components as content panes in Panels (or so).

By default any parameters for the component are entered manually by the end user, but they can also be pre-populated with CTools contexts on the page (which will also hide the form input).

So if you can find a way to transform your "... rules to perform some action ..." in a Rules component, you should be good to go.

Some pointers to some more docu/demos about it (also mentioned on its project page):

5
  • Thank you :) for your all help and understanding my question and pointing towards right direction !!
    – jas
    Dec 8, 2015 at 8:24
  • Thank you for your feedback (and "accept ...). I'd be interested in getting some more details about how my "pointer" helped you to get it to work. Maybe you want to ADD your own answer also, something like "using the hint about 'Rues panes', this is how I got it to work, and this is how my exported Rule looks like". I bet it would be upvoted! If you want to do so: hurry (before your question eventually gets put on hold). PS: I voted against closing your question. And with my edits of your question, I hope the current close counter (= 3) will not increase anymore ... Dec 8, 2015 at 9:31
  • Thanks for spending more time and efforts and clearing up things. Frankly speaking I haven't accomplished it yet but I am going thorough videos etc and it seems it can solve problem. I did accept as for efforts but if this is confusing other users and close votes are coming. Please guide me what to do with this situation. Do I un-accept it until I am not solve this completely. But as far I can tell you changed title this is what exactly I am trying. Please let me know what I am supposed to do now with answer
    – jas
    Dec 8, 2015 at 9:55
  • Thank you again for your efforts and time. I am working and hopefully will try to provide updates as soon I will be done hopefully. But I think for current situation at least you understood question and pointed towards using module and trying solution.
    – jas
    Dec 8, 2015 at 10:05
  • OK for me. If some day you add another "answer" to this question here, then please let me know about it via another comment to my answer here (so that I get notified about it). For now: au revoir! Dec 8, 2015 at 10:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.