I'm writing a module which allows admins to overwrite the content of the footer in a newsletter settings form. The text is processed by the token module to replace macro's. For using the simplenews token set, the recipient account object must be present. In the current implementation only the node object is passed to theme('simplenews_newsletter_footer'). With this patch the whole context array is passed.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | simplenews-1010124-1.patch | 1.82 KB | skilip |
Comments
Comment #1
skilip commentedComment #2
simon georges commentedSounds trivial, but I'm waiting for Miro's review, in case there are some side effects I don't see.
Comment #3
miro_dietikerI agree with that we also had issues with theming newsletter fragments where missing context.
For the next big step we should rework our theming completely. However this won't happen for 6.x-2.x.
Comment #4
miro_dietikerFixed in cvs.
Needs D7 port.
Comment #5
miro_dietikerAssigning
Comment #6
DrupOn commentedThis has already been implemented with the D7 version. The entire context array is already passed to the theme function.
Comment #8
shark commentedQuestion, in reference to the 6.x-2.x-dev branch.
Is it considered a bug that the $node object is no longer passed to the footer template?
I can write a patch to either update the "Available variables" list in themes/simplenews-newsletter-footer.tpl.php or fix template_preprocess_simplenews_newsletter_footer() so it sticks $node in the theme $variables, but I'm just wondering what the desired behavior is now (should people use $node from the footer template, or use $context['node']?
Thanks.