Is there a way to set a default title per content type using Panelizer? I see that you can use substitutions and change the title after you've created the content, but I would like it to use a specific substitution by default.

I know that I could use the autonode titles module, but I'd rather not add on more modules. Any ideas? -JB

EDIT: Just to clarify, I want to use a substitution for the title (a field from the content type), and the reason I want to set the default is so my admins don't need to change it themselves.

  • do you like use custom idea in your custom module with some line code only?
    – Yuseferi
    Jan 9 '14 at 18:02
  • Are you suggesting I edit the existing module? That would be fine with me if you give me a clue where the necessary line in the code is... Jan 9 '14 at 18:29

If you're using a custom module already and you want to 'set' the title prior to saving the node then you can use hook_node_presave().

To avoid contributor confusion when creating the node you can also do a form_alter and set the #access of the title field to false. This will hide the field from the contributor.

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.