Hello
To generate my block, i use NodeBlock module. So i create a content with my content type NodeBlock and a block is automaticaly created.
I create a template suggestion block--nodeblock.tpl.php.
To get and see variables i want to use in my template suggestion block--nodeblock.tpl.php, I use dsm($block).
"dsm" returns a lot of variables and i don't know how to get a variable. I'm simplifying below the tree to get the variable : "css_bck_red"
#node (Object) stdClass
field_css_color_background_box (Array, 1 element)
und (Array, 1 element)
0 (Array, 3 elements)
value (String, 11 characters )
css_bck_red
I tried $block->["#node"]->field_css_color_background_box['und'][0]->value
or $block->field_css_color_background_box['und'][0]->value
but it doesn't work
Thank you very much for your help !
Comments
Comment #2
evets33 CreditAttribution: evets33 commentedComment #3
evets33 CreditAttribution: evets33 commentedAnswer :
$block->{'#node'}->field_css_color_background_box['und'][0]['value']
Comment #4
Johnny vd Laar CreditAttribution: Johnny vd Laar at ezCompany commented