9

I set up a Rule that will execute during the "Content is viewed" Event and the action was to show a system message.

It worked and was triggered when I viewed the node. However, when I went to the home page, it was triggered N times, where N is the number of nodes on the /node page.

How do I stop this from happening? The Rule should only fall through on content full view, and exclude the teaser view.

2 Answers 2

12

In your rule add a data comparison called "view-mode" and set it to "Full content".

0

This might be inefficient but this is what I did:

Added a condition - Data comparison site:current-page:path == node/[node:nid]

This is to make sure that it is showing up on the actual full /node/nid page and not as a teaser view.

4
  • 2
    In data comparison is also "view-mode" and you can set it to "Full content" Jun 24, 2013 at 16:50
  • @NigelWaters that's the right answer, you can add it as answer. radj: you condition will fail if you enable pathauto or an other URL aliasing mechanism. Jun 25, 2013 at 16:40
  • @NigelWaters Yes, please add as an answer so I can select it as the correct an answer. Thanks!
    – radj
    Jun 25, 2013 at 19:50
  • @Mathankumar It did not fail because [...:path] is the pure system path, not the URL which can be an alias.
    – radj
    Jun 25, 2013 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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