0

I have a new content type I am developing that I am packaging using Features.

What I need to do is alter the page title for the node add page for this content type from the Features' .module file. I cannot see an appropriate module hook to do this.

0

The node/add/... page is a form, so you could do it with a hook_form_alter().

  • I've looked through the array using dpm() but I don't see the page title value – Allan Thomas Jan 29 '13 at 19:23
  • Is it imperative that you do it from a custom module, or would you be willing to use a template? There are a number of tutorials about the latter, such as worchestra.com/post/theming-node-forms-drupal-7 – beth Jan 29 '13 at 19:28
  • It is to be an agile 'feature' that will be passed around so to speak so, yes, via a module would be the best. p.s. It's a D6 site – Allan Thomas Jan 29 '13 at 19:33
  • Have you tried this tutorial for doing it via hook_theme() in d6? drupal.org/node/310302#comment-1169768 I don't really know what you mean by "agile feature". I don't know how you would go about integrating custom hooks into Features modules. – beth Jan 29 '13 at 19:44
  • Agile as in it can be installed on several sites very easily (by non-devs.) Therefore it cannot utilize template.php. A features' .module file can be used just like any other custom module (even if you recreate it, your code will remain intact.) – Allan Thomas Jan 29 '13 at 20:15
0

I ended up using drupal_set_title() in hook_form_alter()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.