Can someone please help me with this, it is important for me...
Here's the case:
In my site i use a lot of views with contextual filters, my links are therefore like https://www.example.com/foo/foo/999 where 999 is the number of a user profile ID
What i want is to get the 999 variable out of this URL to put it as a value in a redirect rule.
I already have a "Check path" in my rule with the "contains" option because the "begins with" option doesn't seem to work, although i have done it exactly as described on the "path rules" module homepage this condition won't get a TRUE.
What to do?
Thanks...
Nielsvoo
Comments
Comment #1
nielsvoo commentedif someone else is trying to do this...
I fixed it using php in a custom token with some php code to get the variable out of the URL, by adding this custom token to the $site token part it is always available in my site as global token.
here is the code for the Token
Nielsvoo
Comment #2
Richard15 commentedSome solutions are:
$path_args = explode('/', request_path());
$path_uri = explode('/', request_uri());