I'm trying to do this in a module tpl.php file and nothing is being rendered...

print render($content['field_custom']);

Any pointers or help would be much appreciated.
Thanks

Comments

tomamon’s picture

I found this on the forum to begin with but, am having no luck...
https://drupal.org/node/1323842

tomamon’s picture

This is my custom module for theming a custom content type node add form

<?php
// $Id$
/**
*@file
* Custom Fuctions
*/
function clientform_form_alter(&$form, &$form_state, $form_id) {
	if($form_id == 'clients_node_form')
	{$form['title']['#title'] = 'Client Name';}
}
/**
* Implements hook_theme().
*/
function clientform_theme($existing, $type, $theme, $path) {

  return array(
    'clients_node_form' => array(
      'render element' => 'content',
      'template' => 'clients-node-form',
      // this will set to module/theme path by default:
      'path' => drupal_get_path('module', 'clientform'),
    ),
  );
}
?>

Here is a few of my attempts at creating a working tpl.php file

This gives me a blank white screen of death:
<?php print render($content); ?>

This prints everything as I would expect it to:
<?php print drupal_render_children($content); ?>

This prints nothing:
<?php print render($content['field_custom']) ?>

This is in a module and not in the sub-theme ...
Any help would be awesome as I've been trying for a day to figure this out..
Thanks mucho