The module allows to create links that run rules.

Uses

1. Visit /admin/people/permissions
and add the "Execute rules that react on "Rules link clicked" event" permission to roles that can click the link.
2. Open "Manage fields" tab and add the "Rules link" field.
3. Input the link text into the "Rules link text" field. You can add classes if you want (for example, if you need that the link looks like a button, you can add the "button" class).
4. Create the rule and select the "Link clicked on content item" event from the "React on event" listbox. (if the link was added to account, you should select the "Link clicked on use" event).
After that, two variables will become available that you can use in conditions and actions.
The first is the entity that the link belongs to (node in our case).
The second variable is called "link_id" and stores the value of id link attribute (id attribute of the <a> tag).

Attention! Be careful!

Rules actions may ignore permissions.
Let's say you created the Rules link field that execute the rule which delete the node.
In this case, all users who can click the link can also delete the node, even if they don't have permission for this.
In such situations, you can create rule's condition for checking users roles.

screenshot-1

screenshot-2

screenshot-3

screenshot-4

screenshot-5

screenshot-6

Supporting organizations: 

Project information

Releases