you can use node--NAMECONTENTTYPE.tpl.php
in your directory template. Please see this documentation and comments about templates in Drupal 6 http://drupal.org/node/17565, this will give you a guidance to recognize some few differences with Drupal 7.
to be more detailed, you can copy/paste to your theme directory the file node.tpl.php (located in modules > node
or already located inside your theme directory) and rename it according your content type. for example, if the Content Type is Article
the name will be node--article.tpl.php
already inside in node--article.tpl.php
you can see the variable $content
or you can use $node
. $content
(or $node
) variable is carrying the content of your node. you can use print_r($content);
to see the list of the fields that you can use to your node (or if you use Devel module, is best use dsm($content);
)
see this example:
I have a field called field_demotext1
, then this is the way that I can use to call their respective value inside any custom html zone of my node layout:
echo $content['field_demotext1']['#items'][0]['value'];
here is the example of zone in the node--article.tpl.php
where you can use a custom html:
<div class="content clearfix"<?php print $content_attributes; ?>>
<?php
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
//print render($content); comment to hide all content
echo $content['field_demotext1']['#items'][0]['value']; //will only show field_demotext1 value
?>
</div>