0

I am writing a custom rule, I do not know how to approach getting the correct URL for the redirect.

I have a page - website.com/content/newsletter-activity-001 that needs to redirect an anonymous user to website.com/content/activity-001 until they are logged in.

I have a reference field in 'newsletter-activity-001' that holds the title to 'activity-001'. I want to write a rule that will apply this for newsletter-activity-002 and so on as the site content grows.

How do I dynamically pull that url out and place it into the redirect path? Would tokens do it?

1 Answer 1

0

The tokens [site:current-page:path] & [site:current-page:url] will retrieve the current Drupal path & the full URL, respectively.

1
  • Thank you! I was taken a different direction so this thought process won't get finished. I appreciate your feedback that helped me.
    – timwhelan
    Commented Apr 15, 2015 at 14:00

Your Answer

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

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