How do I find a template?
سؤال
How I determine which template or form is responsible for processing node of page with this URL: mysite.com/node/node-number/edit ?
I think, that Drupal find the template of edit in this files:
page-node-edit.tpl.php
page-node- node-number.tpl.php
page-node.tpl.php
page.tpl.php
However, in my theme folder I have only page.tpl.php
without the code of edit template, but edit template is worked.
And in template.php i heve this preprodsse_node:
function my_theme_preprocess_node(&$vars) {
$node = $vars['node'];
switch ($node->type) {
case 'page':
break;
}
}
Now I think that the CCK module to generate this form. I can change one field or a behavior of the form?
P.S.
I need to change some input in edit form. And I can't use a different version of Drupal :(
المحلول
If you want to change the default value of fields in node edit form. You should looking on any *.tpl.php files. You have to define your own custom module and use hook_form_alter
You can use this if-statement inside the hook function.
// remember change [nodetype] to the one you want to alter.
if($form_id == 'nodetype_node_form'){
// your code here
}