By zigma on
How can i change the title of node creation form for a custom CCK type.
By default it says,
"Create MyCustomCCKNode"
I would like it to appear as
"Add MyCustomCCKNode"
Please let me know a simple way of doing this.
Thank you.
Comments
I think you have to create a module to do this
I think you need to create a module with a function similar to this:
this isn't working for me.
this isn't working for me. Has anyone had success with this?
You need to also do a couple
You need to also do a couple other slight modifications to this snippet in order to get it to work properly...
I made a custom module (named idcards), with a .info and .module file. Inside the .module file I pasted this code after the opening
<?phptag (without the opening/closing php tags below):You need to change the word before _form_alter to your module's name, or to your theme's name if placing this snippet inside template.php. Then you need to change the value inside the
if ('nameof_node_form' ==statement to the content type name on which you want to have the page title changed (in my case, the content type wasid_card).__________________
Personal site: www.jeffgeerling.com
This works for me
Thanks geerlingguy!
I was able to get this function to work using it within a new .module after I was unsuccessful with it in template.php.
Same here
Same here.
I tried http://drupal.org/project/stringoverrides but didn't work.
Maybe http://drupal.org/project/page_title
page_title will only change
page_title will only change the title of nodes, not the administration pages.. geerlingguy's solution worked for me - thanks!
- Matt
Title not changed when validate
Hi all,
The function drupal_set_title('Some Title') works fine when form loads.
However when I submit the form and if there are any validation errors, the title not remain change into "Some Title".
What is the wrong there?
Thanks
Install the Stringoverrides
Install the Stringoverrides module, and 'translate' this:
Create !typeto this:
Add !typeContact me to contract me for D7 -> D10/11 migrations.
Simple way
I tried string override but it did not work so i just create a node template with the name (page-node-add-nodetype.tpl.php) and i went inside and changed the header title
print $head_title;and the title outputprint $title;to the name i wanted to use and voila0.This worked great for me.
This worked great for me. Created a custom module name Form Titles and it worked. Thanks!
miss anything?
@Dan, I tried to do the same thing but it didn't work. To be specific, I created a content type named "test" and to remove the word "create" I created a template file named "page-node-add-test.tpl.php" based on the default "node.tpl" and I changed the
print $title;to
print test;I didn't find the $head_title in the node.tpl. Could you please tell me if I miss anything?
Thanks