1

I want to add a token in a field which is used when the simplenews module is installed and configured. There is then a block available for each newsletter. In this block the user can fill in his email and push the subsribe button.

I want to display a token in this field:

  • Block > Simplenews subscribption block > block message.

(the block title is supporting tokens, but the block message not)

How to do this?

0

It's likely there's no off-the-shelf solution here. The block message field is a variable in the Simplenews module. It's not possible to make variables dynamic; there's no hook to override variable values.

In order to make something like this happen, you'd have to use a combination hook_form_alter() to change the block setting form & hook_block_view_alter() to alter the output of the Simplenews block.

1
  • Oke, I never did this so I will try. I guess I have to make a custom module with this methods to override the current behavior. – Justme Sep 25 '15 at 9:33

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.