Let's say I have a node called "product". When I create such a node, it will always display: "Create product" as the title of the node. How do I change this title WHEN CREATING THE NODE?
相关问题
- Drupal 8: How do I customize a form widget to show
- drupal :: order complete hook and upgrade user per
- Change redirect in Drupal 7 for Password Recovery
- How light weighted Dexterity-base contenttype can
- Sinatra: How to respond with an image with headers
相关文章
- What is a nice, reliable short way to get the char
- Render a Drupal node
- How to allow multiple blocks in a module of Drupal
- carrierwave setting content_type incorrectly
- How can I redirect a Drupal user after they create
- JAX-RS Jersey Read entity with Content-Type “*”
- Drupal 6: Getting custom fields into the database
- Saving a document to SharePoint brings up “Web Fil
try with
This should do the trick in your custom module, just be specific to the content type.
try this,
}
It's Work.
Thanks, Latika S.
you mean you have a content type "product"?
the "Create product" title when creating a node of type "product" is set in
node_add($type)
:there are at least 2 options to change this:
t()
it is passed through) vialocale_custom_strings_
, or$form['title']['#title'] = 'foobar'
- you only need thedrupal_set_title('foobar')
). this is a little harder, as you have to write your own module.I assume you mean that you want to change the words "Create Product"
For a quick and easy solution you can use the [string override][1] module. It is a little bit of a hack but it is simple and has a nice UI for changing this - there is something to be said for simplicity :-)
[1]: http://drupal.org/project/stringoverrides string overrides
I contributed a module that solves this problem. Check out Node Add Title.
Hope it helps.