Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

So, if you create a new .tpl.php for your content type, you can simply print the divs as html, and echo the vars as php.

example:

<div class="MyClass">
<?php print $title; ?>
</div>
<div class="MyOtherClass">
<?php echo render($content['some_field']); ?>
</div>

See http://stackoverflow.com/questions/8074485/drupal-7-how-to-render-custom-fieldhttps://stackoverflow.com/questions/8074485/drupal-7-how-to-render-custom-field for a starting point on pulling specific custom fields, for separation, if needed.

be sure to have a copy of your original node.tpl.php in your theme folder as well, or your node--my-content-type.tpl.php wont work! Again, see https://www.drupal.org/node/17565.

So, if you create a new .tpl.php for your content type, you can simply print the divs as html, and echo the vars as php.

example:

<div class="MyClass">
<?php print $title; ?>
</div>
<div class="MyOtherClass">
<?php echo render($content['some_field']); ?>
</div>

See http://stackoverflow.com/questions/8074485/drupal-7-how-to-render-custom-field for a starting point on pulling specific custom fields, for separation, if needed.

be sure to have a copy of your original node.tpl.php in your theme folder as well, or your node--my-content-type.tpl.php wont work! Again, see https://www.drupal.org/node/17565.

So, if you create a new .tpl.php for your content type, you can simply print the divs as html, and echo the vars as php.

example:

<div class="MyClass">
<?php print $title; ?>
</div>
<div class="MyOtherClass">
<?php echo render($content['some_field']); ?>
</div>

See https://stackoverflow.com/questions/8074485/drupal-7-how-to-render-custom-field for a starting point on pulling specific custom fields, for separation, if needed.

be sure to have a copy of your original node.tpl.php in your theme folder as well, or your node--my-content-type.tpl.php wont work! Again, see https://www.drupal.org/node/17565.

Source Link

So, if you create a new .tpl.php for your content type, you can simply print the divs as html, and echo the vars as php.

example:

<div class="MyClass">
<?php print $title; ?>
</div>
<div class="MyOtherClass">
<?php echo render($content['some_field']); ?>
</div>

See http://stackoverflow.com/questions/8074485/drupal-7-how-to-render-custom-field for a starting point on pulling specific custom fields, for separation, if needed.

be sure to have a copy of your original node.tpl.php in your theme folder as well, or your node--my-content-type.tpl.php wont work! Again, see https://www.drupal.org/node/17565.