By ballerjones on
Perhaps I haz noobness,
But is there a way to Change "Create [insert content type]" to "Submit [insert content type]"?
So that when I go to http://example.com/?q=node/add/example, the title is Submit Example and not Create Example
I looked around with Devel, but found nothing.
Comments
All text in Drupal's user
All text in Drupal's user interface is run through the translation system and are stored as string templates. Using this module you find these string templates and modify them:
http://drupal.org/project/stringoverrides
In your case the string template is probably "Insert !type". Just replace it with "Submit !type".
--
Jakob Persson - blog
Leancept – Digital effect and innovation agency
Thanks, But I'm afraid
Thanks,
But I'm afraid "Create !type" does not exist. Or, at least, not for me. I have tried "Create %type" and "Create !contenttype" but to no avail. Would this be in my theme module? Or maybe in Node module?
Node module. Just search for
Node module. Just search for "create" and see what comes up.
--
Jakob Persson - blog
Leancept – Digital effect and innovation agency
Yep, right before you replied
Yep, right before you replied I found it.
Create @name
is the original.
Thanks for the link. I've been looking for something like this for a while. This site is full of useful tools but is very bad at revealing them to those in need. So people in forums end up being your search tool.
thanks again
So how do you override it?
I am trying to do the same thing (change the word "Create" to "Submit" with content types, and I found this code in node.pages.inc:
So the drupal_set_title is adding the "Create" before the content type name. I can change this to "Submit" and it changes the "Create [content type]" to "Submit [content type]" as I want it to, BUT I'm doing this in the core files (node.pages.inc). That is a no-no, right? When I update core in the future I'd have to go back in and re-edit node.pages.inc, right?
So I know I want to override this function, but where do I make the override? I've read about overriding and as far as I can tell I should be able to put the following code in template.php in my themes folder (i.e. sites/all/themes/zen_subtheme):
but when I do this my add new content pages still have the "Create [content type]" title.
I'm sure I'm missing something simple but I can't determine what it is...
Can anyone help?
Try using hook_menu_alter()
I've had good success with using a hook_menu_alter to change the title of a page, since core doesn't seem to reliably respect the t() function of it's
<?php drupal_set_title(t('Create @name', array('@name' => $types[$type]->name)));?>****
Joel "Senpai" Farris | certified to rock score