1

I have different urls :

  • domain.com/blog : a list of articles made with Views module
  • domain.com/blog/article-title : article alias
  • domain.com/newsletter/confirm/add/xyz/ok : confirmation link sent to new subscribers by email by Simplenews module
  • domain.com/blog/ok : page to which subscribers are redirected after they click the confirmation link (simplenews passes the last arg to the redirect page)

For now, domain.com/blog/ok returns the same as /blog or a 404 (if I set the Global:null contextual filter in Views). I'd like new subscribers to be redirected to the blog page with a custom status message (for instance "You're now subscribed").

I guess it's something with hook_menu ? or MYTHEME_preprocess_page ?

0

In case someone's interested, I finally got it fixed implementing a simplenews hook :

function MY_MODULE_simplenews_subscribe_user() {
  drupal_get_messages('status'); // Flush default simplenews status message
  drupal_set_message(t('My custom message'), 'status'); // Set my own message
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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