Changing the Node header in Drupal?
7 replies
do you mean you have a "product" content type ?
the "Create Product" header when creating a node of type "product" is set to node_add($type)
:
// ...
drupal_set_title(t('Create @name', array('@name' => $types[$type]->name)));
$output = drupal_get_form($type .'_node_form', $node);
// ...
there are at least 2 options to change this:
- change the translation string 'Create @name' (denoted
t()
by which it goes through) through- settings.php - find
locale_custom_strings_
or - http://drupal.org/project/stringoverrides
- settings.php - find
- change "product_node_form" as indicated by gpilotino (minus
$form['title']['#title'] = 'foobar'
- you only needdrupal_set_title('foobar')
). this is a little more complicated as you have to write your own module .
+6
source to share
I am assuming that you want you to change the words "Create Product"
For a quick and easy solution, you can use the [string override] [1] module. It's a bit hacky, but it's simple and has a nice interface to change it - there is something to be said for simplicity :-)
[1]: http://drupal.org/project/stringoverrides string overrides
+1
source to share
I have implemented a module that solves this problem. Check Node Add Header .
Hope it helps.
+1
source to share