Hi
I wanted to hide the subscribe block for users who had already subscribed, and this looked ideal.
I can't get it to work though - should it work, or is it out of date? Really like the idea of using the PHP block display settings for this if possible.
Thanks!
Comments
Comment #1
sutharsan commentedThis is at least out of date. I do not know about 4.7.x, but it certainly does not work in 5.x.
However you can use a variable $subscribed in theme_simplenews_block() to turn on/off the block content.
Comment #2
Jason Dean commentedHi
Thanks for the info, but I created block-simplenews.tpl.php and tried using the $subscribed variable... but it doesn't seem to be available?
I inserted this into the .tpl to check and it wasn't listed:
<?php print var_export($variables, TRUE); ?>Am I missing something here? Apologies if this is due to my lack of Drupal understanding and not a Simplenews thing...
Comment #3
sutharsan commentedWhat you are missing is the override of the theme function. See http://drupal.org/node/55126, under 'How to Name your Override Function'.
A block-simplenews.tpl.php is not required.
Comment #4
sutharsan commentedComment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.