costum theme node edit form & node add form !

2 posts / 0 new
Last post
Sudarsono
Sudarsono's picture
Offline
Joined: 7 Mar 2011
Points: 227
costum theme node edit form & node add form !

Halo saudara saudara drupal .

saya mempunyai masalah pada link documentasi

http://drupal.org/node/601646

--------------------------------------------------------------------------

saya telah mengikuti langkah langkah dari drupal.id dengan membuat di template.php sepertyi ini

<code>

function especial_theme($existing, $type, $theme, $path){
  return array(
    'comment_form' => array(
     'node_form' => array(
      'arguments' => array('form' => NULL),
      ),
  'get_node_form' => array(
    'arguments' => array('form' => NULL),
      'template' => 'node-get-edit'    
        ),
    )
  );
}

</code>

 

--------------------------------------------------------------------

dan di node-content_type-tpl.php dengan

 

<code>

<?php

 <h2>masak begitu masak begini</h2>

 <?php unset($form['title']); ?>

<?php

 print drupal_render($form);

?>

</code>

 

permasalahan nya . sekarang saya tidak bisa mendapat kan efek apa apa di creat content atau edit node ...!

 

apakah kawan kawan drupalis semua nya pernah mengalami kasus yang sama seperti saya !

jika ada bisa kasih pencerahan !

 

Terimakasih

duckz
duckz's picture
Offline
Joined: 5 Jul 2010
Points: 40
  'get_node_form' =>

  'get_node_form' => array(
    'arguments' => array('form' => NULL),
      'template' => 'node-get-edit'    
        ),
    )

 

kuncinya disini... itu 'get_node_form' musti sama dgn form id yg akan di rubah, 'node-get-edit' adalah nama templatenya jadi 'node-get-id.tpl.php'

jadi asumsinya kalo node yg ditheme adalah node form, itu code salah semua.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.