Closed (fixed)
Project:
Rules
Version:
6.x-1.1
Component:
Rules Engine
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Jan 2009 at 14:42 UTC
Updated:
30 Jun 2010 at 07:30 UTC
hi,
would be nice if the current path could be ckecked if it is equal to a string. i need to call actions if a user is an a specific page. or should it be done by php?
regards
Comments
Comment #1
fagoYou can already do that with a token, however it would be faster if we would do that with plain php before invoking rules. I can of adding way to add custom events for something like that - so things stay as fast as possible.
Comment #2
mitchell commentedThere is also a "Path has alias(es)" condition.
Comment #4
gagarine commentedHello,
Can we have more infos please :). I would like run a ruleset when user visite a path like "firemyrules/arg1/arg2/arg3". When you say "plain php" you think about a module? I can create a tiny costume module but how you run rulesset with PHP?
Thanks for your help
Comment #5
fagoenable the module to get a php input evaluator + php condition + action.
Comment #6
gagarine commentedThe problem is not the condition but how invoke the rules. I think one way is to create a new event on a module http://drupal.org/node/298549
Comment #7
gagarine commentedHere my costum code. Hop this can help somebody.
Comment #8
mitchell commentedYou could use the 'user is going to view a page' event with a 'path has alias' condition.
See also #442432: Improve textual conditions (starts with, ends with, contains, is equal to, regex).