hi..
have a content of review type . which have an field_banner field, with content:

<?php $node->field_banner (array)

    $node->field_banner[0] (array)

        $node->field_banner[0]['value'] **
            banner code! 
        $node->field_banner[0]['format']
            1 
        $node->field_banner[0]['view']
            <p>banner code!</p> ?>

i want to put show the $node->field_banner[0]['view'] in the $banner block

Comments

eaposztrof’s picture

oh, sorry.. i press the post button before finished..
so..

i want to put the $node->field_banner[0]['view'] in the $banner block,
i configured the block:
content:

<?php
print $node->title;
print print_r($node->content['field_banner']);
?>

Show on only the listed pages: review/*

and just "1" printed..

how i can doo that? thx..

http://eaposztrof.com | save the planet, kill yourself!

nevets’s picture

Create a custom block and PHP code something like

<?php
if ( arg(0) == 'node' && is_numeric(arg(1)) ) {
  $node = node_load(arg(1));
  if ( node->type == 'review' ) {
    $node = node_build_content($node, FALSE, TRUE);
    print $node->field_banner[0]['view'] ;
  }
}
?>

Make sure you set the input format to 'PHP Code' and save the block.

Then assign the new block to the approriate region.

eaposztrof’s picture