admin
25 October 2016
Versione Drupal
Inserire il seguente codice nel file template.php
function [THEME_NAME]_theme() {
return array(
'NODETYPE_node_form' => array(
'arguments' => array(
'form' => NULL,
),
'template' => 'tpl/NODETYPE-node-form', // set the path here if not in root theme directory
'render element' => 'form',
),
);
}
creare il file NODETYPE-node.form.tpl.php ed inserire la seguente riga
<?php print drupal_render_children($form); ?>
Per stampare i singoli filed la sintassi è la seguente
<?php
print drupal_render($form['title']);
print drupal_render($form['body']);
print drupal_render($form['actions']['submit']);
print drupal_render($form['actions']['preview']);
print drupal_render($form['actions']['delete']);
?>