Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi guys, I have embeded a privatemsg box as a block for a node, but I have just one problem, The title of the page should be the nodes title and not "Write new message to ..." How can I change this?
Comment | File | Size | Author |
---|---|---|---|
#7 | page-title-705804-7.patch | 1.11 KB | aramboyajyan |
Comments
Comment #1
BerdirHm. I suppose moving the drupal_set_title() out of the form and instead add a helper function that is called as the page callback that only sets the title would be the correct fix.
I assume you call the form from your node template?
There are two workarounds I can think of...
1. Call drupal_get_form() in a module in hook_nodeapi(), $op = 'view', something like:
2. Re-set the title after you call drupal_get_form():
Re-classifing the issue, will create a proper fix later.
Comment #2
WaQuEe CreditAttribution: WaQuEe commentedThanks, it worked perfectly!!! Well I loaded the form in a block, all I did was set the title as you said:
Comment #3
BerdirDon't set issues to closed, but fixed instead. (fixed issues are automatically marked as closed after 2 weeks of inactivity but still displayed to see for others). And in this special case, let's keep this open to work on a proper fix without the need for an workaround.
Comment #4
jonhy81 CreditAttribution: jonhy81 commented+1. Thanks.
Comment #5
KiLLAH89 CreditAttribution: KiLLAH89 commentedAnd how can i get the title of a user panel page with D7?
Thanks
Comment #6
aramboyajyan CreditAttribution: aramboyajyan commentedI am having the same issues; will prepare the patch for all active branches and post it here shortly.
Comment #7
aramboyajyan CreditAttribution: aramboyajyan commentedComment #9
oadaeh CreditAttribution: oadaeh as a volunteer commentedThis issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-1.x branch (bug fixes only) or the 7.x-2.x branch.
Thank you.