Hi,

Can anyone tell me or point me to the right post regarding rendering a field without the html added.

For example, in my .tpl file i added:

<?php if ($field_product_demo_site): ?>
	        <a href="<?php print render($content['field_product_demo_site']) ?>">Demo site</a>
	      <?php endif; ?>

To output a link but i only want the rendered field (field_product_demo_site) to be plain text only without any of the markup it adds by default.

cheers,

Comments

soundsational’s picture

Okay, found the solution. Had to create a field--field_product_demo_site.tpl.php file and remove all the markup from there.

cheers,