0

I have a block value which I need to access in a views row design template. I need to check the value of the block content in this template.

Does anyone know how?

| improve this question | | | | |
0

You can use the following code.

$block = block_custom_block_get($block_id);
$content = $block['body'];

But be advised that it would generally contain html which would be difficult to parse.

If you are looking to store a value and then use it to check in the theme layer I would suggest creating an admin page for that and storing the value in the variables table, which you can later access by

variable_get('my_setting', 3);
| improve this answer | | | | |

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.